?
Solved

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

Posted on 2001-07-19
11
Medium Priority
?
409 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 400 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses
Course of the Month16 days, 22 hours left to enroll

864 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