Webbrowser Click Submit Button
I have a button on a webpage. I want to automaticlly click the button via code.
I am using an HTMLdocuement but I can not find this button to be able to click it.
I have in the past used the following code, but with the button below no luck. WebBrowser1.Document.getElementById("testbutton").Focus WebBrowser1.Document.getElementById("testbutton").Click
Here is the actual HTML code for the button I am trying to click.
<input onclick="submit()" class="textbutton" value="Track it" src="/images/btn_trackit.gif" type="image">
Any ideas?
thanks,
Dean
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Webbrowser Click Submit
I am using the Webbrowser control and I am trying to submit a form. The button is a bit different then normal and nothing I have tried has worked.
Here is the forms submit button code.
Code:
<a class="artzBtn def" onclick="document.theform.submit();">Submit</a>
Any ideas on how to sumbit this kind of form? Thanks in advance.
Webbrowser Submit Button?
I'm working with webbrowser and I'm having trouble submitting this form. Usually the submit button has a name, but this one doesn't.
VB Code:
WebBrowser1.Document.All("submitbuttonnamehere").Click
What would I replace submitbuttonnamehere with? Here is the buttons HTML code.
<input type="button" value="Post" onclick="this.form.action='address here';this.form.submit();">
Click A Submit Button With No Name...
say i want my vb app to click a submit button i a webbrowser, nor mally i would do this:
VB Code:
WebBrowser1.Document.All("name of button").Click
but what is the button des not have a name? for example, the html code is this:
Code:
<td><font face="verdana, arial, helvetica" size="2" ><input type="submit" class="bginput" value="click me!">
how would i be able to 'click' this?
Controlling Webbrowser Submit Button
hi,
i was trying to control a submit button in webbrowser1 in vb6.
the code from the html is
Code:
<input type="submit" value="Send SMS" size="40">
and my button code is
Code:
WebBrowser1.Document.getElementById("submit").Click
But its not working for me
anyone can help me?
Thanks!
Webbrowser Submit Button Not Working
can anyone tell me why, when viewing this page in a webbrowser control, the "Log In" button does not work?
https://www.oldnational.com/
if you leave the fields blank, the java validation seems to work, but entering even garbage into the Username/pass fields and clicking "Log In" does nothing!
if i view in an IE window, it works just fine.
the button wont work even when simply viewing the page in a webbrowser control!
-tearing my hair out over this, so please help
WebBrowser Document Submit With 'MAP' Button
I have an automated interface to the Ameritrade stock brokerage site. They recently made a change that killed my interface. On their initial site ( www.ameritrade.com ), there is a 'Client Login' button that must be pressed to move forward to the login screen. This button is defined as a MAP element as follows:
<MAP NAME=m><AREA HREF=https://wwws.ameritrade.com/apps/LogIn/ COORDS=28,7,173,43 SHAPE=RECT><AREA HREF=/tell_me_more/tell_me_more.fhtml
COORDS=25,413,170,447 SHAPE=RECT></MAP>
I am trying to figure out how to press this button using VB code. The normal 'click' approach does not seem to work. If I manually press the button with my mouse, the rest of my process works. I know I can use API calls to mouse move and then press the button, but I would just like to know the 'proper' way to do it. I have also tried just navigating directly to the embedded URL, but their login seems to require the button press to work correctly.
Thanks in advance for your help.
Submit Button Click (This Is With A Twist Not The Same As Others)
ok here is the thing i want to click an sign in button in my webbrowser in vb6
now here is the deal
i have an references to Microsoft internet control shdocvw.dll & shdocvw.oca
i have an references to Microsoft HTML Object Library MSHTML.TLB
now here is the code
Code:
Private Sub Command2_Click()
wb.Navigate2 "https://gmail.google.com/?dest=http%3A%2F%2Fgmail.google.com%2Fgmail"
Print "url printed"
Do Until wb.Busy = True
DoEvents
Loop
Print "done..."
End Sub
now wb = webbrowser (only one present)
https://gmail.google.com/?dest=http%...le.com%2Fgmail = Google's Mail account sign in
now there is another code and the problem lies here
Code:
Private Sub Command4_Click()
wb.Document.All("submit").Click
End Sub
when i press command button 4 i get an error 91 saying
Run-time error '91':
Object variable or with block variable not set
when i click on debug i get the wb.Document.All("submit").Click line highlighted
can any one solve this problem i seriously need this thing working
or i am in deep trouble
if possible be as detail as possible so i can understand it properly thx
if you want the project file do reply and i shall try to put it into an zip and link it here
thx for ur time and reading this problem if you have the solution or any thing to add do reply ASAP thx
Problem With WebBrowser Control After Using A .submit Button
So my code works and opens the page, fills the forms, submits them, but once it does that the program crashes with a run-time error 91 as soon as the next page starts to load. Here is the code:
Code:Private Sub Command1_Click()
WebBrowser1.Navigate2 "http://games.swirve.com/utopia/login.htm"
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Dim Place As HTMLDocument
WebBrowser1.document.All.Item("Username").Value = Text1.Text
WebBrowser1.document.All.Item("Password").Value = Text2.Text
WebBrowser1.document.Forms.Item("Enter Utopia").submit
End Sub
The page that the .submit loads into has 3 frames and is cgi, which might have somethign to do with it. If you can help me in any way, I would appriciate it.
Edited by - Omega037 on 10/31/2002 8:41:42 PM
How To Click On A Submit Button Silently In A Web Browser
hi. i was having a problem with inet using the executing command but i just thought this would be easier. but i'm having one problem. i need it to click on the Submit button within the webbrowser. but I don't know how I would go about doing that. please help. thanks.
if it helps
the button for Submitting is
<input type=submit value="Confirm">
there is no input name. so i can't use
With WebBrowser1.Document
.All("Submit").Click
i also have this other problem... with inet
strURL = "https://political.moveon.org/obamabuttons/process_sticker.pl"
strFormData = "confirm=1&fbt_id=&x=0&fb_id=&state=" & state.Text & "&y=0&email=" & email.Text & "+" & index.Text & "@gmail.com&city=" & city.Text & "&id=&country=United+States&req_phone=&sticker=187&name=" & name1.Text & "&phone=" & phone.Text & "&zip=" & zip.Text & "&phone_type=mobile&address1=" & address.Text & ""
Inet1.Execute strURL, "Post", strFormData, _
"Content-Type: application/x-www-form-urlencoded" & vbCrLf
Do Until Inet1.StillExecuting = False
DoEvents
Loop
i dont see why its not working. if it worked correctly, there would be a validate email in my email but there isn't.
Is It Possible To Detect A HTML Form On A Remote Site, And Click The 'submit' Button?
Alright.
Lets say there is a form which would be called through VB, etc, etc, I have that part working fine.
What I essentially want, is when They user clicks submit on the VB Application, it will somehow locate the submit button, and click it.
I cannot use Exact X/Y Coordinates, because they change (Long story).
Is there any possible way to do this?
There are also two buttons, Reset and submit, so I would only need the Submit one, obviously.
Click Button To Log-In In Webbrowser?
Hey, I'm trying to create a program to log-in to a website and check for changes, but I cannot figure out how to click the Log-In Button? Any clues to how this is done?
Code:
Dim HTML As HTMLDocument
Dim HTML_INPUT As HTMLInputElement
Set HTML = WebBrowser1.Document
For Each HTML_INPUT In HTML.getElementsByName("username")
HTML_INPUT.Value = txtUsername.Text
Next
For Each HTML_INPUT In HTML.getElementsByName("password")
HTML_INPUT.Value = txtPassword.Text
Next
For Each HTML_INPUT In HTML.getElementsByName("Login")
HTML_INPUT.Click
Next
WebBrowser. Click On A Button
I have a web page loaded into a webbrowser control and need to click a button on the page every 20 seconds
I have the Name of the Control Name="abc1" ID="abc1"
Would appreciate some help with the code to do this. eg
Browser1.document.??? "abc1" .click
Have tried real hard to find the exact method of doing this,
but nothing seems to work.!
kennedymr2
Webbrowser - Unable To Click Button
I have a problem concerning clicking a button in a .asp webpage.
I stripped the code of the website and uploaded it to a host:
http://www.nt.kicks-ass.org/bw/test/index.asp
I can't seem to be able to click the button using WebBrowser.
Tried different things, all from this excellent forum but I can't make it work.
I really hope someone is able to help me.
WebBrowser Click Button (JavaScript)
Hi Guys,
This on is a little tricky.....
I have an ADSL Moden that I want to be able to control (thru code) the Wireless function (Enable/Disable).
Sounds easy enough, except there is NO elements that I can use!
The HTML (containing JavaScript) dosn't alude to any "Button" Names or ID's.
I first need to select the button to open a new controlbox (not window, as this stays the same URL) to get to the CheckBox that performs the Wireless control. I also cannot manipulate
this checkbox even when I manualy navigate to this spot! - I get Object not set with .... dialog.
I therefore asumed that the Webbrowser, for what ever reason, isn't holding those objects.
In any case, first things first - I need to be able to .Click that first button
I have exhausted my use/knowledge of DOM etc.
Ideas?
(PS I will upload the HTML latter)
Cheers 'n' Beers,
Bruce.
How To Make A Webbrowser Click A Button
i have a web browser who will fill up the webpage textboxes with the text i want, now i want that my program clicks in the SEND button...what is the command to do that?
Webbrowser Click On Button In FRAME
I have a web page loaded in a webbrowser control.
The page has Frames
I know the frame number and name, but need to click on a button called Refresh1 in frame 3 of the page.
Have has a pretty good at this but cannot get it to work.
Would appreciate the exact code syntax to click on a button in a Frame
Regards Turnerrob
How Can I Click The Send Button In Webbrowser
this is the HTML from the page:
<td align=right><font size=2 face=arial,geneva color=000000><input
class="btnDsp" type="button" onClick='onSend();' value='Send'> <input
class="btnDsp" type="button" onClick='saveDraft();' value='Save Draft'>
<input class="btnDsp" type="button" onClick='spellCheck();' value='Spell
Check'> <input class="btnDsp" type="button" value='Attach'
onclick='onAttach(); return false;'> <input class="btnDsp" type="button"
onClick="location.href='splash.php?ArdSI=881e80cb5f0bf1a97b99d4d2bbb6cf76'"
name="cancel" value='Close'></font></td>
Can I click a button when I only have the Value and not the Name?
Any help is greatly appreciated.
Thanks
Rel
WebBrowser Submit W/out A Submit Name
I get the error "Object not set" on the red when I run this code:
I am just trying to submit a query to Altavista.
Help, thanks...
Code:
Private Sub Form_Load()
WebBrowser1.Navigate "http://www.altavista.com/"
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
With WebBrowser1.Document.Forms(0)
.All("q").Value = "Dragonball Z roms"
.All("submit").Click
End With
End Sub
WebBrowser Submit?
what do you do when there are two submit buttons on a form that are the same type "Submit" with different names/values?
normally theres only one submit button so you do.
webbrowser1.document.forms(0).submit
so.. any help?
Webbrowser Help In Submit
--------------------------------------------
<input name="Submit" type="button" onMouseOver="this.className='btnBlueOn'" class="btnBlueOn" onClick="ValidateClaimStatusForm()" value="Submit Transaction" />
--------------------------------------------
Here I want to navigate to another page bu clicking the submit button.
But HTML.All.Item("Submit").Click is not working..
it throws the error as Run time error '438' Object doesn't support ..
Can anyone please ehelp
How To Make A Button As The Default Submit Button
Hi Friends,
Sorry once again for asking a simple question, but I don't have an answer and I have tried all sorts of things. I have many buttons in my application and I want to make a particular button called cmdSave as default button for that form. That means, when the user finishes filling up the form, he should be able to access the cmdSave button by pressing the Enter key. How do I do this? Thank you very much. Thank you for all your replies for the previous questions.
--Srikanth.
Edited by - sri1025 on 8/22/2005 9:04:21 AM
Webbrowser Control Submit
Code:
WebBrowser1.Document.All("submit").focus
SendKeys ("{ENTER}")
this bit of code focus on button on my website then sendkeys enter to the submit button,but then ihave to keep the vb app focused open,any over methods i can get it to click the submit button instead of using sendkeys thanks
WebBrowser Form Submit?
This is the info on the submit button i'm trying to auto submit for. I want to click the I Accept button
<INPUT type=submit value="I Accept" name=accept>
<INPUT type=submit value="Don't Accept" name=reject>
WebBrowser1 - How Do You Click Submit If It Has No Name?
HTML Example:
Code:
<input type=submit value=Submit></form>
I know you can use:
Code:
With WebBrowser1.Document
.All("Submit").Click
End With
if the input had a name, but how do I do it on something like the above, where it has only the type and value?
Thank you.
Submit Using POST Method With Webbrowser
Hi,
I am trying to submit a form using the webbrowser control. However, it requires using the post method which I am not really familiar with. The html looks like this:
<FORM ACTION="JOBSRC_A.CFM?cfid=5286799&cftoken=14505647" METHOD="POST">
<INPUT TYPE="Hidden" NAME="START" VALUE="31">
<INPUT TYPE="Hidden" NAME="State_Val" VALUE="'All'">
<INPUT TYPE="Hidden" NAME="FullPartAll" VALUE="'All'">
<INPUT TYPE="Hidden" NAME="Depart_Val" VALUE="'All'">
<INPUT TYPE="Hidden" NAME="HistDate" VALUE="All">
<INPUT TYPE="Hidden" NAME="SearchCriteria" VALUE=''>
<INPUT TYPE="Submit" NAME="SubmitSQL" VALUE=" NEXT 30>> ">
<INPUT TYPE="Hidden" NAME="INTERNALEXTERNAL_VAL" VALUE="ALL">
<INPUT TYPE="Hidden" NAME="WORKHOURS_VAL" VALUE="'9999999999'">
<INPUT TYPE="Hidden" NAME="NoRows" VALUE="30">
</FORM>
Can someone please explain to me how I can submit this form and the values.
Help Needed With Webbrowser Form Submit
hi
below is a sample form that i wanna use webbrowser to submit.
the problem i encountering is that when i use
webbrowser.documents.forms(0).submit
i'll get an error msg from the server, my action will be process on the page my webbrowser is currently on.
while from the form below, the information are meant for
'aus_stars_main.add_subject_web3'
thanks
<form onSubmit="return disableForm(this);">
<INPUT TYPE="hidden" NAME="index_nmbr" VALUE="12345">
<INPUT TYPE="hidden" NAME="p1" VALUE="123465">
<INPUT TYPE="hidden" NAME="p2" VALUE="…ƒŠŒ‹‹“™">
<INPUT TYPE="hidden" NAME="p3" VALUE="23-JUL-2004 16:30:24">
<INPUT TYPE="hidden" NAME="add_direct_P" VALUE="">
<INPUT TYPE="hidden" NAME="add_direct_G" VALUE="N">
<INPUT TYPE="submit" VALUE="Confirm to Add Subject" OnClick="this.form.action='aus_stars_main.add_subject_web3';">
</FORM>
anyone have any idea how to do this?
Submit This Webbrowser Form Programmically?
Hi, im trying to submit this form which is on a webpage, loaded into webbrowser1
Code:
<form name=form1 method=post action=talk.php>
<input type="hidden" name="i" value="1">
<input type="hidden" name="input1" value="">
<font color=red face="verdana,arial" size=2></font></i></td><td width=70%><font size="2" face="verdana,arial" color="#000000">Hello! What is your name?</font></td></tr>
<tr><td valign=top><font face=verdana size=2>Input: </font></td><td valign=top><input type="text" name="input" size="55" class="text" style="width: 170px">
<input type="submit" name="Submit" value="Submit" class="knop">
</form>
Ive tried the following, but none seam to work
Code:
WebBrowser1.Document.Forms(1).Submit
WebBrowser1.Document.Forms(0).Submit
WebBrowser1.Document.All("form1").Submit
WebBrowser1.Document.Forms("form1").Submit
WebBrowser1.Document.Form1.Submit
Do you think its because the form name (in the HTML code) isnt in quotes?
Grateful if anyone could help
Thanks.
Ive tried using
Webbrowser - Input/submit Problem
Usually i can handle my code problems just reading the foruns. But not this time! Thats why i'm doing my first post now
using a webbrowser control, I need to fill a form and submit it. I managed to fill all the 3 fields, but i'm in trouble to make the submission.
There's a small graphic button with no name and no relevant tags in it, and i cant see how to simul the click by code.
my code:
Code:
Private Sub Form_Load()
wWeb.Navigate "http://www.ogame.org/portal/?lang=org&frameset=1"
End Sub
Private Sub wWeb_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If (pDisp Is wWeb.Application) Then
If URL = "http://www.ogame.org/portal/?lang=org&frameset=1" Then
wWeb.Document.All("login").Value = "UserName"
wWeb.Document.All("pass").Value = "Password"
wWeb.Document.All("uni").Value = "ogame383.de"
'--------------------------------------------------------------------
'And now the submit button.
'Some options i tryed with no sucess:
'--------------------------------------------------------------------
'wWeb.Document.All("formular").Submit() = True
'wWeb.Document.All.submit.Click
'wWeb.Document.All("formular").Click
'Dim btn As Object
'For Each btn In wWeb.Document.getElementsByTagName("Login")
' If btn.Value = "Sign In" Then
' btn.Click
' Exit For
' End If
'Next
'--------------------------------------------------------------------
End If
End If
End Sub
the only html code for the clickable object is:
Code:
<input type="image" src="img/main/login.gif" width="40" height="15" border="0" value="Login">
there is also some java script embebed, but i cant see how to deal with it. So please take a look at it.
Thanks is advance
MathVince
Webbrowser Document Submit Help Needed
I'm using the Webbrowser control how do I submit the button below? If thats not possible can i just send a click command to the subject field like Webbrowser.Document.All.('subject').Value.Click (thats probably not right) something like that?
<vbcode>
<BUTTON
onclick="var f = this.form; f.notes_compose_form_submit.value = 'send';if (f.request_submitted) { return false; } this.innerHTML = '<span><em>Please wait...</em></span>'; this.disabled = true; f.request_submitted = true; setTimeout(function() { if (!f.onsubmit || f.onsubmit()) { f.submit() } }, 150); return false;"
type=submit>Send</BUTTON>
</vbcode>
Problem With WebBrowser Control .submit
So my code works and opens the page, fills the forms, submits them, but once it does that the program crashes with a run-time error 91 as soon as the next page starts to load. Here is the code:
Private Sub Command1_Click()
WebBrowser1.Navigate2 "http://games.swirve.com/utopia/login.htm"
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Dim Place As HTMLDocument
WebBrowser1.document.All.Item("Username").Value = Text1.Text
WebBrowser1.document.All.Item("Password").Value = Text2.Text
WebBrowser1.document.Forms.Item("Enter Utopia").submit
End Sub
I have tried this with other pages, and the problem is definately with the .submit line.
Click 'submit' On Web Form Outside Project?
Hi.
I got a webbrowser running outside my vb project, and i need to click the submit on webform:
is this possible to do this way, or do i have to add a webbrowser in project?
<html>
<form enctype='multipart/form-data' method=post action='http://host.com/cgi-bin/'>
<input type='text' name='thetext' value='hi there.'>
<input type='submit' value='Send'>
</form>
</html>
Thanks,
naitsabes
Help:click On An Image To Submit A Web-form!
how can i click on an image to submit a form?.
I complete the fields email and password but i can't click on the image to login.
the html page has this code:
<INPUT type=image height=46 alt=entra width=72 src="/sk0375/home_files/Images/bott_entra.gif" border=0
name=entra tabindex="3"> </TD></TR>
it is taken from the url http://communicator.virgilio.it
and to click the image i use this code that is in the loop that scans the forms in the html page:
:Code:
if WebBrowser1.Document.Element.Type = "image" Then WebBrowser1.Document.element.click End If
but nothing happens.where is the mistake?
Edited by - luic77 on 6/22/2003 11:15:54 AM
Help With WEbBrowser Component And Multiple Submit Buttons
I am using the WebBrowser component trying to simulate click a button. I was trying to use
Code:
WebBrowser1.Document.Forms(0).Submit
which did not work after much searching I tried
Code:
WebBrowser1.Document.Forms(0).Item("north").Click
Neither of those worked. THe button I am attemting to press is a submit button north the html code where it is found is :
Code:
<form action="index.php?do=move" method="post">
<center>
<input name="north" type="submit" value="North" /><br />
<input name="west" type="submit" value="West" />
<input name="east" type="submit" value="East" /><br />
<input name="south" type="submit" value="South" />
</center>
</form>
any help would be apreciated
Really Tough Question Using The WebBrowser Control And Submit
It may be hard to answer this question, but I'll ask anyway. My program enters information onto a web page and clicks the "Sent" button, so it submitted to the person, then I want it to go to the next person, fill out the info and click Sent, etc. Here is the code I have:
VB Code:
'loads the page to fill out the infoWebBrowser1.Navigate ("http://messaging.myspace.com/index.cfm?fuseaction=mail.message&friendID=29980516") 'waits for the page to loadDo Until WebBrowser1.ReadyState = READYSTATE_COMPLETEDoEventsLoop 'enters information into the subject lineWebBrowser1.Document.All("ctl00_ctl00_Main_Main_sendMessageControl_subjectTextBox").Value = "Meeting 4pm on friday" 'enters information into the message bodyWebBrowser1.Document.All("ctl00_ctl00_Main_Main_sendMessageControl_bodytextbox").Value = "Come to this meeting" 'submits the infoWebBrowser1.Document.Forms("aspnetForm").submit
Then it repeats with each different URL. This is what the code looks like:
VB Code:
Private Sub SendMessage()Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETEDoEventsLoop WebBrowser1.Document.All("ctl00_ctl00_Main_Main_sendMessageControl_subjectTextBox").Value = "Meeting 4pm on friday"WebBrowser1.Document.All("ctl00_ctl00_Main_Main_sendMessageControl_bodytextbox").Value = "Come to the meeting" WebBrowser1.Document.Forms("aspnetForm").submit Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETEDoEventsLoopEnd SubPrivate Sub Command1_Click() WebBrowser1.Navigate ("http://messaging.myspace.com/index.cfm?fuseaction=mail.message&friendID=29980516")Call SendMessageWebBrowser1.Navigate ("http://messaging.myspace.com/index.cfm?fuseaction=mail.message&friendid=48592019")Call SendMessageWebBrowser1.Navigate ("http://messaging.myspace.com/index.cfm?fuseaction=mail.message&friendID=147931680")Call SendMessageWebBrowser1.Navigate ("http://messaging.myspace.com/index.cfm?fuseaction=mail.message&friendID=147934582")Call SendMessageWebBrowser1.Navigate ("http://messaging.myspace.com/index.cfm?fuseaction=mail.message&friendID=147931680")Call SendMessage
For some reason, it will only send the information for the very last URL. For the above ones it fill in the info then goes straight to the next URL. It never clicks submit. Here is a simpler example if you don't understand. the code is supposed press the submit button on one page, then press the submit button on another page (without the 'wait for page to load' code:
VB Code:
WebBrowser1.Navigate ("http://messaging.myspace.com/index.cfm?fuseaction=mail.message&friendID=29980516")WebBrowser1.Document.Forms("aspnetForm").submitWebBrowser1.Navigate ("http://messaging.myspace.com/index.cfm?fuseaction=mail.message&friendID=48592019")WebBrowser1.Document.Forms("aspnetForm").submit
It only submits on the second URL. Can anyone help?
Thank you,
Brad
Auto Fill And Submit A Form Using Webbrowser
I found this code in the VB.net code bank. it should fill 2 text fields when browsing a webpage. "email and passwd" r the names of the test fields and the values of these will be held in variables which will be ready for when the user is ready to login.
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.Document.GetElementsByTagName("Input").Item(0).SetAttribute("Value", "email")
WebBrowser1.Document.GetElementsByTagName("Input").Item(1).SetAttribute("Value", "Passwd")
WebBrowser1.Document.GetElementsByTagName("Input").Item(2).InvokeMember("Click")
End Sub
End Class
I need this for VB6 i dont know how to manipulate the code so that i can use it in my VB6 application.
Automated Form Submit Problem In Webbrowser
I am trying to automate SMS sending to a group of people with a VB prog.
OK I managed to set up my VB prog to connect thru a webbrowser control, log in (Via a form) with the .submit command to the browser but have hit a snag.
When I get to the frame with the form that sends a sms I use the following code.
Set Doc = WebBrowser1.Document
Doc.frames(2).Document.Forms(0)("body").Value = TheSMSMessage
Doc.frames(2).Document.Forms(0)("mobileno").Value = "0123456789" 'The mobile number
The form is populated fine, so
Doc.frames(2).Document.Forms(0).submit ' submit the form.
So off it goes all looks ok, then we get a message saying "A general error has occured" and the message does not get sent.
If I click the button it works fine and dandy.
My question is guys, how can I simulate a real click, or get around this prob. I have included the form for reference. ANy help appreciated.
Help With Webbrowser - How To Submit Form.. (harder Than It Sounds)
Usually, ino most websites theres more than one form on a webppage. To post to it, all you need it Webbrowser1.Document.Forms(1).submit.click. My question is, how can u detect how many input boxes there are (boxes, checkboxes, etc) in each form, then post to the form with the most number of input areas?
For example, form 1 is a searchbox - the way the webpage owner makes money (1 input area). The 2nd form is the main submit form, containing 6 input areas. The 3rd form contains 2 input areas. How can i automatically post to the form with the most input areas? I cant just type Webbrowser1.Document.Forms(2).submit.click because one website may be different from another.. any ideas/suggestions?
Submit Button In VB6
Hello All,
I use Microsoft Internet Control (Web Browser)
I used it to open a web page .. i want to Do this :
1 - the page contain a sumbit button .. I want to click it from visual Basic
2- I want to view the page source in text box
Thanks alot
Ahmad
Submit Button!
I want to display a MsgBox to the user when the Submit button in a web page (using the WebBrowser control) is clicked (or the user presses the Enter key on the keyboard when the focus/mouse cursor is in a Text HTML input element). How do I implement this?
Submit Button
When a user hits submit I want it to send a file to:
C:TempDte mp
Where Dte is updated from code and tmp is updated from the code. It can be anyfile. So say they use a browse command to find a file on their HD, then they hit submit and it sends it to this location where Dte and tmp change according to this code provided from [A51g]Static.
Here is the original thread with more details...
VB Code:
Dim tmp As Datetmp = Format(Day(Date), "dddd") 'to get weekending (if friday)Dim Dte As DateDte = DateDo Until Format(Day(Dte), "dddd") = FridayDte = DateAdd("d", 1, Dte)Loop 'Dte now = Firdays Date
Clicking On A Submit Button
I have this website that I want to click on a submit button. I already know how to add a value into a text so now I want to submit it. But the submit button doesn't seem to have a name. And the form just has "action=..." and "method=...". BTW, there are 2 submit buttons on the page.
Help With Submit Button On Web Page
I am relatively new to VB so please excuse me if this is a newbie type question. I am looking to fill a box with a certain number and click the submit button once an hour on a web page (Not one I created). I can leave the web page up as long as I want, so that is not an issue. Could someone point me in the right direction as to what I need to or use to write this code? Thanks for any help you can provide!
|