Webbrowser submit problem
Hi guys,,
i got this in the source code :
Code:
<td class="cat" colspan="2" align="center">
<input class="btnlite" type="submit" tabindex="5" name="preview" value="Preview" />
<input class="btnmain" type="submit" accesskey="s" tabindex="6" name="post" value="Submit" />
<input class="btnlite" type="submit" accesskey="k" tabindex="7" name="save" value="Save" /> <input class="btnlite" type="submit" accesskey="c" tabindex="9" name="cancel" value="Cancel" />
and i tried:
W.Document.All("post").Click
W.Document.All("submit").Click
W.Document.All("btnmain").Click
but nothing seems to work??? :sick:
Re: Webbrowser submit problem
You have 4 buttons. "preview", "post", "save", and "cancel". You tried "post" and it should have worked. Try the other three by their names.
<input class="btnlite" type="submit" tabindex="5" name="preview" value="Preview" />
<input class="btnmain" type="submit" accesskey="s" tabindex="6" name="post" value="Submit" />
<input class="btnlite" type="submit" accesskey="k" tabindex="7" name="save" value="Save" />
<input class="btnlite" type="submit" accesskey="c" tabindex="9" name="cancel" value="Cancel" />
If this doesn't work please give any error messages that occured.
Make sure the page has fully loaded and it is the page with the buttons before you try any of those .click statements
Re: Webbrowser submit problem
Yes i tried...my friend made it...
I think it's a ieframe.dll problem hmmm
but i cant replace it :(
1 Attachment(s)
Re: Webbrowser submit problem
If it is IFrame then look at this example
Re: Webbrowser submit problem
i will look at tit now...thanks
i did look at it...
I really don't know what how to use the frames..and which name to put as frame? hmm
Btw that code i wrote initially works on 2 other computers...not on mine :(
And i still get that error 438 ! :( :(
And now i tried using sendkeys...
i've sent
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{ENTER}", True
and it worked...submit button was pressed...but that's not the general slolution...
and even ig that worked i get runtime error -5 and the project stops ???? no hiighlited error is shown :(
Re: Webbrowser submit problem
Well i dont see the form name...i figured out how to use forms...but i dont see the form name in the code :S
Re: Webbrowser submit problem
Did the example project I posted work?
Also post the HTML or a link to it so I can see what it is you need to do.
Re: Webbrowser submit problem
M8...the problem is that...i have some problems with the control...webbrowser...the code i posted here..works perfectly on another 2 computers...
my pc wont let me click..when the:
W.Document.All("post").Click
is in action..i get the error 438 nobody else does..only i do...and i dont know why???
I tried your code...but it didnt help me that much...
Re: Webbrowser submit problem
Then post your code (I mean your VB code) and the document you are trying to deal with otherwise I can't do any more for you.