Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Javascript question
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

redbrad0
Advanced Member

USA
3725 Posts

Posted - 01 May 2001 :  17:52:58  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
ok im not a java person so i know im doing something wrong in this code...


<script Language="JavaScript">
<!--

function SubmitPage(theFormName) {
if (document.theFormName.submit();
}
//-->
</script>


basically what im trying to do is to be able to specify 'theFormName' when i call the javascript function like this...


<a href="javascript:SubmitPage(<%=rs("Prod_ID")%>)">


can anyone tell what i am doing wrong? Its giving me this error..
document.theFormName is not an object

Brad

Edited by - redbrad0 on 01 May 2001 18:40:41

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 01 May 2001 :  19:31:42  Show Profile  Visit HuwR's Homepage
try passing it document.formname

ie SubmitPage(document.theFormName)
and then your function would be


function SubmitPage(objForm) {
objForm.submit();
}




Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 02 May 2001 :  00:02:41  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
thanks huwr

Brad
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.29 seconds. Powered By: Snitz Forums 2000 Version 3.4.07