grasperstail Posted September 18, 2007 Share Posted September 18, 2007 Has anyone had this experience? When I call a function and submit a form in IE6 it passes throught the function up until the submit method then stops or goes not further. I've used the alert to test the values of the variables. I've tried explicitly calling the element( document.forms[2].submit() ).Here is the code:The form:<form action="query_field_link.php" method="post" id="hiddenForm" name="hiddenForm"> <input type="hidden" id="frmhiddenid_ae" name="frmhidden_ae"/> <input type="hidden" id="frmhiddenid_code" name="frmhidden_code"/> <input type="hidden" id="frmhiddenid_caan" name="frmhidden_caan"/> <input type="hidden" id="frmhiddenid_descrip" name="frmhidden_descrip"/> <input type="hidden" id="frmhiddenid_date" name="frmhidden_date"/> <input type="hidden" id="frmhiddenid_type" name="frmhidden_type"/> <input type="hidden" id="frmhiddenid_location" name="frmhidden_location"/> <input type="hidden" id="frmhiddenid_cad" name="frmhidden_cad"/> <input type="hidden" id="frmhiddenid_photo" name="frmhidden_photo"/> <input type="hidden" id="frmhiddenid_sqlstr" name="frmhidden_sqlstr"/> </form>link calling the function:<td class="result"><a class="link" href="java script:void()" id="{$show_result['caan']}" name="{$show_result['caan']}" onclick="hiddenFields('caan','{$show_result["caan"]}')">{$show_result['caan']}</a></td>function hiddenFields(field_name, field_value){ var v2 = field_name var v3 = field_value var frm = document.getElementById("hiddenForm") switch (v2){ case "ae": var x=document.getElementById("frmhiddenid_sqlstr"); x.value= "SELECT * FROM import WHERE ae =" + field_value; break; case "code": var x=document.getElementById("frmhiddenid_sqlstr"); x.value= "SELECT * FROM import WHERE code =" + field_value; break; case "caan": var x=document.getElementById("frmhiddenid_sqlstr"); x.value= "SELECT * FROM import WHERE caan =" + field_value; break; default: alert("There has been an error linking to you search results"); } frm.submit() } Link to comment Share on other sites More sharing options...
grasperstail Posted September 18, 2007 Author Share Posted September 18, 2007 Would anyone be kind enough to help me?? Just a little hint might make the world of difference Link to comment Share on other sites More sharing options...
justsomeguy Posted September 19, 2007 Share Posted September 19, 2007 Other people have been reporting lately that the submit method hasn't been working for them. I'm not sure why. One thing I can say though is that it's a pretty serious security problem if you're having one page submit a SQL query to another page to get executed. Obviously that doesn't have anything to do with the form.submit method, but it's still an issue.Try doing this instead of using getElementById for the form:document.forms['hiddenForm'].action="query_field_link.php";document.forms['hiddenForm'].method="post";document.forms['hiddenForm'].submit();If that doesn't work, change the ID and name of the form to all-lowercase and change the Javascript appropriately and see if that works. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.