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

form won't post via javascript

Status
Not open for further replies.

blueindian1

Programmer
Apr 24, 2001
150
US
i have this page that will not post when i try to use javascript to submit the form. i get "object does not support this method or property".

here is the function and the first bit of the page. the error is on the last line of the script. in other words, i get the "pre" alert.


function submitForm(pageType)
{

if(pageType = 'SETUPINSERT')
{
document.oppEdit.action.value = 'PERFORMINSERT';
}
alert('pre');
document.oppEdit.submit();

}

//-->
</script>
<LINK type='text/css' rel='StyleSheet' href='css/style.css'>
<form name=&quot;oppEdit&quot; method=&quot;post&quot; action=&quot;oppEdit.asp&quot;>
.
.
.
.
.
</form>



any ideas?
 
do you have a submit input type named in the form somewhere? _________________________________________________________
for the best results to your questions: FAQ333-2924
01001111 01101110 01110000 01101110 01110100
onpnt2.gif
[/sub]
 
yes...sorry i forgot that.

Code:
<input type=&quot;button&quot; value=&quot;<%=pageType%>&quot; name=&quot;submit&quot; onclick=&quot;javascript:submitForm('<%=pageType%>');&quot;>
 
Hai I tried it and working fine..
Check it and what version of browser you are using...
 
take the name of the submit out and it will work.
_________________________________________________________
for the best results to your questions: FAQ333-2924
01001111 01101110 01110000 01101110 01110100
onpnt2.gif
[/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top