Solved

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

Posted on 2001-07-19
11
396 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

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

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!

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 …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

728 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