dare87 Posted January 28, 2010 Share Posted January 28, 2010 I've been working on getting a form that will change a portion of the content of the page depending on what you select. I have it working if I just have it display text, but if I change it the whole thing stops working. Please Select the Registration form you would like to complete <form name="registration"> <select name="select" onChange="displaydesc(document.registration.select, theform, 'showform')"> <option selected value="">Select One</option> <option value="">Basketball Tournament</option> <option value="">Rock Band Tournament</option> <option value="">Foot Race</option> <option value="">Booths</option> </select> <br><br> <span id="showform" align="left" style="font:italic 13px Arial"></span> </form> <script type="text/javascript"> var theform=new Array() theform[0]="" theform[1]="<?php echo 'auxiliary/bball.php'; ?>" theform[2]="<?php echo 'auxiliary/rband.php'; ?>" theform[3]="<?php echo 'auxiliary/frace.php'; ?>" theform[4]="<?php echo 'auxiliary/booth.php'; ?>" function displaydesc(which, descriptionarray, container){ if (document.getElementById) document.getElementById(container).innerHTML=descriptionarray[which.selectedIndex] } displaydesc(document.registration.select, theform, 'showform') </script> I've tried changin echo to an include('page.php'), but it just kills it. Please help, I need this to work ASAP Link to comment https://forums.phpfreaks.com/topic/190082-onchange-help/ Share on other sites More sharing options...
dare87 Posted February 4, 2010 Author Share Posted February 4, 2010 any ideas? Link to comment https://forums.phpfreaks.com/topic/190082-onchange-help/#findComment-1006651 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.