kernelgpf Posted November 1, 2009 Share Posted November 1, 2009 My code: <script type="text/javascript" src="prototype.js"></script> <script type="text/javascript"> function sendRequest() { var showtype = document.test.showtype.options; var chosen_showtype = showtype[showtype.selectedIndex].value; var horse_id = document.test.horse_id.options; var chosen_horseid = horse_id[horse_id.selectedIndex].value; new Ajax.Request("ajaxshowsearch.php", { method: 'post', postBody: 'showtype='+chosen_showtype+'&horse_id='+chosen_horseid, onComplete: showResponse }); } function showResponse(req){ $('foofighters').innerHTML= req.responseText; } function replaceshow(show_id,horse_id,showtype) { new Ajax.Request("ajaxentershow.php", { method: 'post', postBody: 'show_id='+show_id+'&horse_id='+horse_id+'&showtype='+showtype, onComplete: function(req){showResponse2(req,show_id,horse_id,showtype);} }); } function showResponse2(req,show_id,horse_id,showtype){ $('show'+show_id).innerHTML= req.responseText; } </script> My form code with pre-filled out information. <form name=test id=test onsubmit="return false;"> Horse: <select name=horse_id id=horse_id><option value=10533>Name Me! (500 classes left to enter)</option></select><br>Show Type: <select name='showtype' id='showtype'><option>experience<option>event</option> </select></select><br><input type=submit name=submit value='Search Shows' onClick=sendRequest()></form> <div id="foofighters"></div> The form shows up in IE and when I click the button it pops down, like some empty space is showing up in the foofighters DIV, but no information comes up. I've researched and it looks like typically simple errors in syntax cause this, but Firebug shows nothing, so I'm lost. 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.