stockton Posted October 8, 2007 Share Posted October 8, 2007 I have a form containing a field defined as:- <td colspan="2" width=50%><input type=text name="BundleNum" id="BundleNum" onChange="submit_click()"></td></tr> and the submit_click() is defined as :- function submit_click() { var BN = document.getElementById("BundleNum").value; window.location="TI4SCAN-4.php?BundleNum="+BN; } </script> and this all works perfectly in Firefox but all I get out of IE is a click when I enter data into the BundleNum field and press Enter? Please tell me how I fix this to work with IE(any version, but probable 6 or 7). Quote Link to comment Share on other sites More sharing options...
d22552000 Posted October 8, 2007 Share Posted October 8, 2007 I would not say on_change casue that means every time they type a single letter or number into it... try,... onchange. then try this: TI4SCAN-4.php?BundleNum change that to a FULL url not a relative url. in IE if you say "./TI4SCAN-4.php?BundleNum" it will automatically convert it to a full url. Quote Link to comment Share on other sites More sharing options...
stockton Posted October 9, 2007 Author Share Posted October 9, 2007 I have tried your suggestions without success. I have now added a Issue graphic button to the page in an attempt to get that to work. Quote Link to comment Share on other sites More sharing options...
stockton Posted October 9, 2007 Author Share Posted October 9, 2007 <a href=./TI4SCAN-4.php?BundleNum=document.getElementById(\"BundleNum\").value&Diva=<?php echo rand() ?> ><img src=images/Issue.png></a> I have tried the above but obviously I do not understand the DOM. Please tell me how to repair same. Quote Link to comment Share on other sites More sharing options...
d22552000 Posted October 10, 2007 Share Posted October 10, 2007 May I ask why you are escaping (adding \) before your apostraphes? (') Quote Link to comment Share on other sites More sharing options...
stockton Posted October 10, 2007 Author Share Posted October 10, 2007 After trying it without and it did not work I thought that it may help. Quote Link to comment Share on other sites More sharing options...
d22552000 Posted October 10, 2007 Share Posted October 10, 2007 this is a javascript problem as far as I know, and I suck at javascript, how about you leave it in a function and change it to a button instead of a link? or change the href to "" and do "ONCLICK="function_name"" Quote Link to comment Share on other sites More sharing options...
stockton Posted October 10, 2007 Author Share Posted October 10, 2007 I have done something similar by incorporating Ajax in the application. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.