Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > WebBrowsers


Reply
 
Thread Tools Display Modes
  #1  
Old 10-22-2005, 02:05 PM
Mystery Mystery is offline
Junior Contributor
 
Join Date: Sep 2005
Posts: 228
Default WebBrowsers


Is there any way to load a web page, then enter values into the boxes visible on the page? And if so, is there a way to click a button as well? (Submit)
Reply With Quote
  #2  
Old 10-22-2005, 02:14 PM
DrFire DrFire is offline
Newcomer
 
Join Date: Sep 2004
Posts: 17
Default

Are you talking about the web browser control or an external web brower like Internet Explorer or Firefox?

You can do it easily with the VB web browser control like this:

wb.Document.Forms(0).email.Value = email
wb.Document.Forms(0).passwd.Value = passwd
wb.Document.Forms(0).submit

wb is the name of the web browser control, and email, passwd, and submit are names of fields in a form on a web page in the web browser control. Find the names of the fields to enter text in to them, and the submit button is pressed simply by the use of .submit

Is this what you are looking for?
Reply With Quote
  #3  
Old 10-22-2005, 02:15 PM
Mystery Mystery is offline
Junior Contributor
 
Join Date: Sep 2005
Posts: 228
Default

yes it is, thanks man
Reply With Quote
  #4  
Old 10-22-2005, 02:28 PM
DrFire DrFire is offline
Newcomer
 
Join Date: Sep 2004
Posts: 17
Default

No problem.
Reply With Quote
  #5  
Old 10-22-2005, 02:52 PM
Mystery Mystery is offline
Junior Contributor
 
Join Date: Sep 2005
Posts: 228
Default

Ok wait a second, that wont work for what im trying to do. The form names for the forms i wanna change are values like ".password" instead of "password" theres a period in front. And when u run it, u cant have:

wb.Document.Forms(0)..password.Value = "Hi"

so what should i do
Reply With Quote
  #6  
Old 10-22-2005, 04:31 PM
Volte's Avatar
Volte Volte is offline
Ultimate Contributor

Retired Leader
* Guru *
 
Join Date: Aug 2001
Posts: 5,343
Default

Try something like this:
Code:
wb.Document.All(".password").Value = "Hi"
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->