Solved

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

Posted on 2001-07-19
11
391 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Cannot Load VB6 on Windows 10. Installed OK but error on opening existing project. 7 87
Problem to page 4 87
Capture logon name 13 73
Problem to App 4 83
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
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.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

803 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