Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submitting a form from a vbscript function.

Status
Not open for further replies.

xenomage

Programmer
Jun 27, 2001
98
0
0
SG
Hi all,

how do i submit a form from a function??

i tried this.

myForm.Submit

but it gives me the error msg that myForm is not an object. Please help.
 
I don't know if this is what u are asking but, u need;

sub b1_onclick

anyline following the above is what action is to be taken when u submit.

where b1 is the id/name of the submit button in the html code below;

<INPUT type=&quot;button&quot; value=&quot;Submit&quot; id=b1 name=b1 >

If this doesn't help let me know in more detail what the problem is!

Mijulie
 
I hope this helps,

with MyForm, be sure that the <form name=&quot;MyForm&quot;> in the html code.

Also, try <input type=&quot;submit&quot; value=&quot;Submit&quot;>.

The other way to do it is in a form, using an image map, <img src=&quot; onclick=&quot;Submit()&quot;>.

Im not sure if you need the parenthensis in the latter, but i know thats a valid method.

Good luck!
 
I know this question was an old one (that I just found), but you can also submit a form from a VBScript function by using the following line:

Document.Forms(0).Submit()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top