myk247365 Posted May 24, 2007 Share Posted May 24, 2007 My page has two forms. One called 'myForm' which is from a w3schools demo and 'modresform' which is giving me considerable grief in IE7. Everything works fine in Firefox 2.When I click the submit button in IE7 I get an 'Object does not support this property or method' error. In trying to understand what's wrong. I've added a line to grab the 'modresform' in addition to grabbing the 'myForm'. I can use the Command Window in MS Script Editor to call the submit function on both f and t. t submits fine, but f gives me the error.Any ideas why this works in FF2 but not IE7?The relevent lines are right here and the full page is included below.Please help!! ;-) //================================================================================function submit_form1(){ f=document.getElementById('modresform'); f.submit();// document.Form1.submit();}</script><script type="text/javascript">function formSubmit(){debugger; f=document.getElementById("modresform");t=document.getElementById("myForm");t.submit();}</script></head><body><p>Enter some text in the text fields below, and then press the "Submit" button to submit the form.</p><form id="myForm" action="js_form_action.asp" method="get">Firstname: <input type="text" name="firstname" size="20"><br />Lastname: <input type="text" name="lastname" size="20"><br /><br /><input type="button" onclick="formSubmit()" value="Submit"></form><form id="modresform" action="ModReservation.asp" method="POST"> <table border="0" cellspacing="0" cellpadding="2" width"10%">####################Entire page starts here######################################<!-- DW6 --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><script LANGUAGE="Javascript" TYPE="text/javascript">var wndTOwarn;function TimeoutWarn(){ if (false) { //user has autologin enabled - simply refresh the page to keep session active location.reload(true); } else { // autologin not enabled - send warning of pending logout setTimeout('TimeoutLogout()', 1000*60*5); wndTOwarn=window.open("timeoutwarning.asp",null,"HEIGHT=100,WIDTH=300"); wndTOwarn.focus(); } }function TimeoutLogout(){ if (!wndTOwarn.closed) { wndTOwarn.close(); location.href="logout.asp?TO=1"; } else { location.reload(true); }}function OpenTourPage(path){ wndTour=window.open("tour/" + path,null,"resizable=1,scrollbars=1,locationbar=false,menubar=false,personalbar=false,statusbar=false,toolbar=false,height=626,width=590"); wndTour.focus();}function LaunchTour(){ wndTour=window.open("tour/intro.asp",null,"resizable=1,scrollbars=1,locationbar=false,menubar=false,personalbar=false,statusbar=false,toolbar=false,height=626,width=590"); wndTour.focus();}</SCRIPT><!--Begin TemplateHeader3.asp--><title>**TEST** NCSA Access Grid Scheduler</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" href="../Include/agstyle.css" type="text/css"></head><body marginwidth=0 marginheight=0 topmargin=0 leftmargin=0 bgcolor="#BBBBBB"onLoad="setTimeout('TimeoutWarn()', 1000*60*240)" style="margin: 0px 0px 0px 0px;"><center><table width="80%" border="0" cellpadding="0" cellspacing="0" height="301" bgcolor="#FFFFFF" style="border: 1px solid black"> <tbody> <tr> <td colspan="2" height="80" valign="bottom"> <table cellpadding="0" width="100%" cellspacing="0" border="0"> <tr> <td rowspan="2" height="80"> <a href="../default.asp" title="Click to go to the home page"><img src="../Images/aglogo.gif" border="0" width="242" height="80" align="left" valign="top"></a> </td> <td valign="top" align="right" width="100%"> <table bgcolor="#666666" border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td width="100%"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td width="24" align="left"><img src="../Images/graynotch.gif" width="24" height="26" border="0"></td> <td align="left" valign="middle"> <p class="Navb script:OpenTourPage('u_mode.asp')" title="Click here for information about View Modes"><img src="../Images/help_ltgrayondkgray.gif" width="28" height="26" border="0"></a></td> </tr> </table> </td> </tr> <tr> <td width="100%"> <table width="100%" height="20" border="0" cellspacing="0" cellpadding="0" bgcolor="#999999"> <tr> <td width="40" bgcolor="#FFFFFF" height="20"><img src="../Images/spacer.gif" width="40" height="1" border="0"> </td> <td width="18" align="left" height="20" bgcolor="#FFFFFF"><img src="../Images/ltgraynotch.gif" width="18" height="20" border="0"></td> <td align="left" width="100%" height="20"><p class="Navb script:LaunchTour();" class="Navb script:cb_show_hide_thing('billing','billingform');" checked > Account Information<br> <div id="billingform" style="display:inline;" ><table> <tr> <td class="Text" align=right>Name:</td><td align=left><input value="Christy Bowser" type=text id="Text1" name="bName" class="MyType"></td> </tr> <tr> <td class="Text" align=right>Dept:</td><td align=left><input value="Chemical and Biomolecular Engineering" type=text id="Text2" name="bDept" class="MyType"></td> </tr> <tr> <td class="Text" align=right>Email:</td><td align=left><input value="cbowser@uiuc.edu" type=text id="Text3" name="bEmail" class="MyType"></td> </tr> <tr> <td class="Text" align=right>Phone:</td><td align=left><input value="244-2815" type=text id="Text4" name="bPhone" class="MyType"></td> </tr> <tr> <td class="Text" align=right>Address:</td><td align=left><input value="600 S. Mathews Ave MC-712" type=text id="Text5" name="bAddress" class="MyType"></td> </tr> <tr> <td class="Text" align=right><table><tr align=right ><td ><span class="Text">Account:</span> </td></tr><tr align=right ><td ><div name="setseldiv" id="setseldiv" class="Text" style="display:none;"><select class="MyType" size=1 name="setsel" id="setsel" onChange="java script:select_show_thing('setsel','aset',-1);"><option value="1" selected>C-FOAPAL</select></div setseldiv></td></tr></table></td><td align=left><table><tr><td align=left ><div name="aset1" id="aset1" class="Text" style="display:none;"><input type=text name="aset1field1" id="aset1field1" class="MyType" value="1" size="1" >- <input type=text name="aset1field2" id="aset1field2" class="MyType" value="493168" size="6" >- <input type=text name="aset1field3" id="aset1field3" class="MyType" value="687001" size="6" >- <input type=text name="aset1field4" id="aset1field4" class="RO" value="143304" size="6" readonly >- <input type=text name="aset1field5" id="aset1field5" class="MyType" value="191100" size="6" >- <input type=text name="aset1field6" id="aset1field6" class="MyType" value="000000" size="6" ></div aset1></td></tr></table><td> </tr> <script language=javascript> select_show_thing('setsel','aset',-1); </script> <tr> <td class="Text" align=right>Paid:</td><td align=left><input "" type=checkbox id="Checkbox3" name="bPaid" class="MyType"><td> </tr> <tr> <td class="Text" align=right> </td><td align=left><a href="invoice.asp?MID=19767" class="StdLink">View Invoice</a><td> </tr> </table> </div> </td> </tr> <tr> <td class="Text"><input type=checkbox name="LocPres" ID="Checkbox4" > Local Presenter<br></td> </tr> <tr> <td class="Text"><input type=checkbox name="NotifyCreator" ID="Checkbox5"> Notify Creator<br></td> </tr> <tr> <td><input type="submit" name="submitter" value="Update" class="MyType" onclick="java script:submit_form1();"></span></td> </tr> </table></form><script language=javascript>//billingform();</script> <!--Begin TemplateFooter.asp--></td> </tr> <tr> <td height="83" class="TemplateArea" width="149"> </td> <td align="center" valign="center" height="70" width="100%" cellpadding="0" border="0"> <hr> <p><br> This site is developed and maintained at NCSA/University of Illinois at Urbana-Champaign. <br>If you have suggestions, comments, or technical issues, please email the <br><a href="mailto:agschedule@ncsa.uiuc.edu" class="StdLink" title="Send an email to the AGSchedule Administrator">AGSchedule Administrator</a>.</p><br> </td> </tr> </tbody></table></center></body></html> Link to comment Share on other sites More sharing options...
aalbetski Posted May 24, 2007 Share Posted May 24, 2007 Here is a simple example showing two forms (one post, one get) that works fine in IE6. I don't have IE7, but it should work. Maybe you can use this as a guide and expand/modify for your needs <%@language=javascript%><form id="form1" action="http://localhost/me.asp" method="post"> <input type="text" name="text1" value="<%=Request.form("text1")%>"/> <button type="submit">submit 1</button></form><hr/><form id="form1" action="http://localhost/me.asp" method="get"> <input type="text" name="text2" value="<%=Request.QueryString("text2") %>" /> <button type="submit">submit 2</button></form> Link to comment Share on other sites More sharing options...
myk247365 Posted May 24, 2007 Author Share Posted May 24, 2007 Here is a simple example showing two forms (one post, one get) that works fine in IE6. I don't have IE7, but it should work. Maybe you can use this as a guide and expand/modify for your needsThanks, but the point is that on form supports the .submit() method and the other doesn't even tho' both are legitimate forms and even show up as such when viewed in the MS Script Editor. What's so different about these two forms that one submits and the other doesn't?thanksmyk Link to comment Share on other sites More sharing options...
jesh Posted May 24, 2007 Share Posted May 24, 2007 If the code that you posted (the "Entire page starts here" part) is any indication, then your HTML is missing the form declarations.On the other hand, if the entire code that you posted is meant to be the page, then the HTML is not well formed: ...<form id="modresform" action="ModReservation.asp" method="POST"><table border="0" cellspacing="0" cellpadding="2" width"10%">####################Entire page starts here######################################<!-- DW6 --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>... Link to comment Share on other sites More sharing options...
myk247365 Posted May 24, 2007 Author Share Posted May 24, 2007 If the code that you posted (the "Entire page starts here" part) is any indication, then your HTML is missing the form declarations.On the other hand, if the entire code that you posted is meant to be the page, then the HTML is not well formed:You're right, I pasted the whole source for the page and some pieces got lost when I posted! I've tried to edit one of the pieces back in and it didn't work. I'll try posting it again.myk Link to comment Share on other sites More sharing options...
myk247365 Posted May 24, 2007 Author Share Posted May 24, 2007 <!-- DW6 --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><script LANGUAGE="Javascript" TYPE="text/javascript">var wndTOwarn;function TimeoutWarn(){ if (false) { //user has autologin enabled - simply refresh the page to keep session active location.reload(true); } else { // autologin not enabled - send warning of pending logout setTimeout('TimeoutLogout()', 1000*60*5); wndTOwarn=window.open("timeoutwarning.asp",null,"HEIGHT=100,WIDTH=300"); wndTOwarn.focus(); } }function TimeoutLogout(){ if (!wndTOwarn.closed) { wndTOwarn.close(); location.href="logout.asp?TO=1"; } else { location.reload(true); }}function OpenTourPage(path){ wndTour=window.open("tour/" + path,null,"resizable=1,scrollbars=1,locationbar=false,menubar=false,personalbar=false,statusbar=false,toolbar=false,height=626,width=590"); wndTour.focus();}function LaunchTour(){ wndTour=window.open("tour/intro.asp",null,"resizable=1,scrollbars=1,locationbar=false,menubar=false,personalbar=false,statusbar=false,toolbar=false,height=626,width=590"); wndTour.focus();}</SCRIPT><!--Begin TemplateHeader3.asp--><title>**TEST** NCSA Access Grid Scheduler</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" href="../Include/agstyle.css" type="text/css"></head><body marginwidth=0 marginheight=0 topmargin=0 leftmargin=0 bgcolor="#BBBBBB"onLoad="setTimeout('TimeoutWarn()', 1000*60*240)" style="margin: 0px 0px 0px 0px;"><center><table width="80%" border="0" cellpadding="0" cellspacing="0" height="301" bgcolor="#FFFFFF" style="border: 1px solid black"> <tbody> <tr> <td colspan="2" height="80" valign="bottom"> <table cellpadding="0" width="100%" cellspacing="0" border="0"> <tr> <td rowspan="2" height="80"> <a href="../default.asp" title="Click to go to the home page"><img src="../Images/aglogo.gif" border="0" width="242" height="80" align="left" valign="top"></a> </td> <td valign="top" align="right" width="100%"> <table bgcolor="#666666" border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td width="100%"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td width="24" align="left"><img src="../Images/graynotch.gif" width="24" height="26" border="0"></td> <td align="left" valign="middle"> <p class="Navb script:OpenTourPage('u_mode.asp')" title="Click here for information about View Modes"><img src="../Images/help_ltgrayondkgray.gif" width="28" height="26" border="0"></a></td> </tr> </table> </td> </tr> <tr> <td width="100%"> <table width="100%" height="20" border="0" cellspacing="0" cellpadding="0" bgcolor="#999999"> <tr> <td width="40" bgcolor="#FFFFFF" height="20"><img src="../Images/spacer.gif" width="40" height="1" border="0"> </td> <td width="18" align="left" height="20" bgcolor="#FFFFFF"><img src="../Images/ltgraynotch.gif" width="18" height="20" border="0"></td> <td align="left" width="100%" height="20"><p class="Navb script:LaunchTour();" class="Navb script:cb_show_hide_thing('billing','billingform');" checked > Account Information<br> <div id="billingform" style="display:inline;" ><table> <tr> <td class="Text" align=right>Name:</td><td align=left><input value="Christy Bowser" type=text id="Text1" name="bName" class="MyType"></td> </tr> <tr> <td class="Text" align=right>Dept:</td><td align=left><input value="Chemical and Biomolecular Engineering" type=text id="Text2" name="bDept" class="MyType"></td> </tr> <tr> <td class="Text" align=right>Email:</td><td align=left><input value="cbowser@uiuc.edu" type=text id="Text3" name="bEmail" class="MyType"></td> </tr> <tr> <td class="Text" align=right>Phone:</td><td align=left><input value="244-2815" type=text id="Text4" name="bPhone" class="MyType"></td> </tr> <tr> <td class="Text" align=right>Address:</td><td align=left><input value="600 S. Mathews Ave MC-712" type=text id="Text5" name="bAddress" class="MyType"></td> </tr> <tr> <td class="Text" align=right><table><tr align=right ><td ><span class="Text">Account:</span> </td></tr><tr align=right ><td ><div name="setseldiv" id="setseldiv" class="Text" style="display:none;"><select class="MyType" size=1 name="setsel" id="setsel" onChange="java script:select_show_thing('setsel','aset',-1);"><option value="1" selected>C-FOAPAL</select></div setseldiv></td></tr></table></td><td align=left><table><tr><td align=left ><div name="aset1" id="aset1" class="Text" style="display:none;"><input type=text name="aset1field1" id="aset1field1" class="MyType" value="1" size="1" >- <input type=text name="aset1field2" id="aset1field2" class="MyType" value="493168" size="6" >- <input type=text name="aset1field3" id="aset1field3" class="MyType" value="687001" size="6" >- <input type=text name="aset1field4" id="aset1field4" class="RO" value="143304" size="6" readonly >- <input type=text name="aset1field5" id="aset1field5" class="MyType" value="191100" size="6" >- <input type=text name="aset1field6" id="aset1field6" class="MyType" value="000000" size="6" ></div aset1></td></tr></table><td> </tr> <script language=javascript> select_show_thing('setsel','aset',-1); </script> <tr> <td class="Text" align=right>Paid:</td><td align=left><input "" type=checkbox id="Checkbox3" name="bPaid" class="MyType"><td> </tr> <tr> <td class="Text" align=right> </td><td align=left><a href="invoice.asp?MID=19767" class="StdLink">View Invoice</a><td> </tr> </table> </div> </td> </tr> <tr> <td class="Text"><input type=checkbox name="LocPres" ID="Checkbox4" > Local Presenter<br></td> </tr> <tr> <td class="Text"><input type=checkbox name="NotifyCreator" ID="Checkbox5"> Notify Creator<br></td> </tr> <tr> <td><input type="submit" name="submitter" value="Update" class="MyType" onclick="java script:submit_form1();"></span></td> </tr> </table></form><script language=javascript>//billingform();</script> <!--Begin TemplateFooter.asp--></td> </tr> <tr> <td height="83" class="TemplateArea" width="149"> </td> <td align="center" valign="center" height="70" width="100%" cellpadding="0" border="0"> <hr> <p><br> This site is developed and maintained at NCSA/University of Illinois at Urbana-Champaign. <br>If you have suggestions, comments, or technical issues, please email the <br><a href="mailto:agschedule@ncsa.uiuc.edu" class="StdLink" title="Send an email to the AGSchedule Administrator">AGSchedule Administrator</a>.</p><br> </td> </tr> </tbody></table></center></body></html> Link to comment Share on other sites More sharing options...
myk247365 Posted May 24, 2007 Author Share Posted May 24, 2007 So that didn't work either...Here's a link to a text file with the source:http://www.ncsa.uiuc.edu/People/mimiller/s...mit_problem.txtPlease let me know what you think.myk Link to comment Share on other sites More sharing options...
jesh Posted May 24, 2007 Share Posted May 24, 2007 The HTML is still not well formed. There are multiple body elements and a rouge </head> floating around near the end. And now there are three forms on the page: "SELECT_TZ", "myForm", and "modresform". Link to comment Share on other sites More sharing options...
myk247365 Posted May 24, 2007 Author Share Posted May 24, 2007 The HTML is still not well formed. There are multiple body elements and a rouge </head> floating around near the end. And now there are three forms on the page: "SELECT_TZ", "myForm", and "modresform".The "SELECT_TZ" form should not play into this problem. I fixed the other problems you mentioned and the behavior is the same, one form supports the submit function and the other doesn't and only in IE. any ideas why?thanksmyk Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.