[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2001-07-19
11
Medium Priority
?
399 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 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
The viewer will learn how to implement Singleton Design Pattern in Java.
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.
Suggested Courses

650 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