April 15, 201016 yr I've had to take a step or two back to look at a jump menu issue and not sure where the problem is. I've created a jump menu list that is populated dynamically using DW. That works fine and when the option is selected it puts the dynamic info into the url for filtering later and that seems to work fine also. The issue is i've had a first attempt at php and it worked locally but get a 500 - Internal server error.There is a problem with the resource you are looking for, and it cannot be displayed. error. I'm sure it's down to my php attempt(s) but might be a js error? I've recreated the page without my php and it works fine, the only issue I have is when an option is selected, the jump menu redirects back to the page and puts ?orgname=organisationselected but reverts back to --select-- in the menu. I'd like the top opton to display the organisation selected so the registrant can see he selected the correct one. Here's it almost working: My linkhttp://www.pitlanepass.com/pages/register.php Here's my code that didn't work remotely... <form name="form" id="form"> <select name="jumpMenu" id="jumpMenu" onchange="MM_jumpMenu('parent',this,1)"> <option value="register.php?orgname=<?php echo $row_rsJumporgregister['orgname']; ?>"> <?php if ($_GET['orgname']=$_GET['orgname']) { echo "<option>"$_GET['orgname']"</option>"; } else { echo "<option>-- select organisation--</option>"; } ?> <?php do { ?> <option value="register.php?orgname=<?php echo $row_rsOrgjumpumpregister['orgname']; ?>"><?php echo $row_rsOrgjumpumpregister['orgname']; ?></option> <?php } while ($row_rsOrgjumpumpregister = mysql_fetch_assoc($rsOrgjumpumpregister)); ?> </select> </form> Is it a simple mistake or am I way off in my methods?
April 17, 201016 yr Your a bit off; Give this a try.. <form name="form" id="form"> <select name="jumpMenu" id="jumpMenu" onchange="MM_jumpMenu('parent',this,1)"> <option>-- select organisation--</option> <?php while ($row_rsOrgjumpumpregister = mysql_fetch_assoc($rsOrgjumpumpregister)) { echo "<option value=\"register.php?orgname=" . $row_rsOrgjumpumpregister['orgname'] . "\""; if ($_GET['orgname'] == $row_rsOrgjumpumpregister['orgname']) { echo " SELECTED"; } echo ">" . $row_rsOrgjumpumpregister['orgname']; . "</option>"; } ?> </select> </form> I've had to take a step or two back to look at a jump menu issue and not sure where the problem is. I've created a jump menu list that is populated dynamically using DW. That works fine and when the option is selected it puts the dynamic info into the url for filtering later and that seems to work fine also. The issue is i've had a first attempt at php and it worked locally but get a 500 - Internal server error.There is a problem with the resource you are looking for, and it cannot be displayed. error. I'm sure it's down to my php attempt(s) but might be a js error? I've recreated the page without my php and it works fine, the only issue I have is when an option is selected, the jump menu redirects back to the page and puts ?orgname=organisationselected but reverts back to --select-- in the menu. I'd like the top opton to display the organisation selected so the registrant can see he selected the correct one. Here's it almost working: My linkhttp://www.pitlanepass.com/pages/register.php Here's my code that didn't work remotely... <form name="form" id="form"> <select name="jumpMenu" id="jumpMenu" onchange="MM_jumpMenu('parent',this,1)"> <option value="register.php?orgname=<?php echo $row_rsJumporgregister['orgname']; ?>"> <?php if ($_GET['orgname']=$_GET['orgname']) { echo "<option>"$_GET['orgname']"</option>"; } else { echo "<option>-- select organisation--</option>"; } ?> <?php do { ?> <option value="register.php?orgname=<?php echo $row_rsOrgjumpumpregister['orgname']; ?>"><?php echo $row_rsOrgjumpumpregister['orgname']; ?></option> <?php } while ($row_rsOrgjumpumpregister = mysql_fetch_assoc($rsOrgjumpumpregister)); ?> </select> </form> Is it a simple mistake or am I way off in my methods?
Create an account or sign in to comment