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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Post Form Syntax 2

Status
Not open for further replies.

ChrisBelzona

Programmer
Oct 25, 2000
137
GB
Me Again!

I Have a drop down list within a form on an asp page, I wish to post the form (not using the Submit button) after the user has chosen the option.

I'm looking to use a VBScript function running off the OnChange property of the drop down list. I don't know the VBS Syntax for making the form post its contents.

Any Help Again
Cheers!

Chris
 
Use javaScript --

the syntax is:
document.formname.submit();
 
Link9

Thanks for the syntax, however I'm having trouble getting it to work, I normally work in Access so i'm not to well up on java but I've listed my syntax below if you could help me any more would be gratefull.

My call to the script onChange="GetSICDesc()"


My Script - Select been my form name
<script language=&quot;JavaScript&quot;>
function GetSICDesc() {
document.Select.submit();
}
</script>

Cheers Chris
 
if you have named your form &quot;Select&quot;, then the above should work fine... the key is to match the formName part of what I posted above with what you name the form.

<form name=Select method=post action=&quot;somePage.asp&quot;>
<!--put your elements here-->
</form>

If you name your form &quot;myForm&quot;, then the syntax is:
document.myForm.submit();

See how it works? :)
paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top