Solved

doc.Forms(0).submit ERROR ?!!

Posted on 2001-07-19
11
389 Views
Last Modified: 2013-11-13
hi there, me again :)

I have a new problem...


I use a little piece of code to submit forms with webbrowser :

I can fill all fields but the problem is on submitting the form.

here is my code :

For q = 0 To doc.Forms(Form).length - 1
  If doc.Forms(Form)(q).Name = "name" Then
     doc.Forms(Form)(q).Value = "Oliver"
  End If
next q

'submit
doc.Forms(0).submit

----------------------------------------------

problem is doc.Forms(0).submit.... It works fine with a html doc I made with this code :

html>
body>
a name="post">font size="5">b>Post a message/b>/font>/a>

  form>
INPUT name="name" type=textarea size="20" >

INPUT name="deuxieme" type=textarea size="20" >

INPUT name="troisieme" type=textarea size="20" >

TEXTAREA NAME="def" COLS=40 ROWS=4 WRAP=physical>/TEXTAREA>

INPUT name="go" type="submit" value="Submit">
input type="reset" value="Clear" name="reset">
  /form>
/body>
/html>

BUT, when I use it with some other forms, I get an error code 438

object error....

any help is as always welcome








0
Comment
Question by:albundy
  • 7
  • 4
11 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 6297879
There is NO input tag with the name "submit"? If so, rename it...

regards,
CJ
0
 

Author Comment

by:albundy
ID: 6298184
mmmmmmmmmmmmmmmm.....


the value on the form that doesn't work is

    <html>
 <body>
 <form>
 <input name="name" >
 <input type="submit" value="submit" name="submit">
 </form>
 <br><br>
 </body>
 </html>

seems to be good, isn't it ?
0
 
LVL 22

Accepted Solution

by:
CJ_S earned 100 total points
ID: 6298200
No, it is not. When you call submit it want to give you the submit-button. Not the submit method!
Get rid of the
name="submit"
or rename it to something like:
name="mysubmit"

regards,
CJ
0
 

Author Comment

by:albundy
ID: 6298203
mmmmmmmmmmmmmmmm.....


the value on the form that doesn't work is

    <html>
 <body>
 <form>
 <input name="name" >
 <input type="submit" value="submit" name="submit">
 </form>
 <br><br>
 </body>
 </html>

seems to be good, isn't it ?
0
 

Author Comment

by:albundy
ID: 6298220
OIC :)

but how can I change it ? because it is on a website !


my ICQ 46836466

0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 22

Expert Comment

by:CJ_S
ID: 6298256
You can use:

doc.Forms(0).submit.click

regards,
CJ
0
 

Author Comment

by:albundy
ID: 6298288
yeahhhhhhhhhhhhhhhhhh

it works :)

you're the best :)

anyway is it vbscript ?


is it a way to use proxy with webbrowser ? to surf anonymaly you know... ?

I give you points...
0
 

Author Comment

by:albundy
ID: 6298294
thx thx thx.......... :o)


let me know about proxy and webbrowser ;)


Regards,

0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6298304
Glad to be of service,
Is it VBScript -> yea
The webbrowser control you mean? I think i do not understand what you mean by proxy and webbrowser....

regards,
CJ
0
 

Author Comment

by:albundy
ID: 6298339
The webbrowser control you mean? I think i do not understand what you mean by proxy and webbrowser....


yep....

I know we can use a proxy with winsock or inet, don't remember....

anyway when you post a message on some board, they catch you're IP, some people don't want their IP to be knew...

so the only is (I think) to use an anonymous proxy....

so is there anyway to 'tell' the webbrowser to use a defined proxy before connect to an url ?
0
 

Author Comment

by:albundy
ID: 6298771
The webbrowser control you mean? I think i do not understand what you mean by proxy and webbrowser....


yep....

I know we can use a proxy with winsock or inet, don't remember....

anyway when you post a message on some board, they catch you're IP, some people don't want their IP to be knew...

so the only is (I think) to use an anonymous proxy....

so is there anyway to 'tell' the webbrowser to use a defined proxy before connect to an url ?
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now