Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 30th, 2005, 04:12 PM
Registered User
 
Join Date: May 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to state
Default handling script errors using vb web browser

hi, i have just made a small web browser in vb and have a button that sets focus on the web browser (WebBrowser1.SetFocus) then access a buttons short cut. i am using (SendKeys "%s", True) the problem is that this web site has script errors on the page. if i was using internet explorer the status bar would handle it with no annoying popup msg. but in my vb browser the script error popup comes up. is there a way for vb to ignore this msg(as the sendkeys is in a loop)

Code:
For i = 1 To Val(txtCount.Text) 'use the Val() function to return the numeric value of a textbox
  SendKeys "%s", True
  'SendKeys "{ENTER}", True 'Enter Script Error
 Next i
and if im reciving this error msg after every sendkeys it defeats the point of the loop. any help would be great thanks :D



 
Old March 30th, 2005, 04:40 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Did you try to catch the error with On Error Goto or Resume Next?
Marco
 
Old March 31st, 2005, 10:51 AM
Registered User
 
Join Date: May 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to state
Default

yes tryed that, its not a vb error buta web page error,

 
Old January 19th, 2006, 09:01 AM
Registered User
 
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Mylo
Default

I'm having the same problem with the webbrowser control. There is a javascript error on the website I am working with. It brings up a Script Error asking if you would like to continue running scripts on this page which i have to click yes or no to continue.
The error is that a javascript variable is undefined.

Also i am using form posting on the same site using PowerTCP's Web Tool which cannot post to the site because of the javascript error. However when using the form posting method, the error message isn't displayed. The information simply isn't posted.

Does anybody have a way to bypass these problems?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Server acting as browser - handling cookies? Philibuster PHP How-To 1 August 15th, 2006 09:39 PM
Ch 15 Try It Out, Handling Global Errors, p.583 VictorVictor BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 February 26th, 2006 10:50 PM
handling all types of errors kliu9 Excel VBA 2 March 9th, 2005 01:06 PM
how do I close a web browser using vb script? aadz5 Classic ASP Basics 15 June 23rd, 2004 11:35 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.