Hello,
Right now, I have the scheduler working well. I have two jumpmenus that send URL variables to the query page to gather data based on what is selected in the menu.
Here’s a jumpmenu on my scheduler.php page, and how I have it set up:
Status:
<select name="jumpMenu2" id="jumpMenu2" onchange="MM_jumpMenu('parent',this,0)">
<option value="scheduler.php?Patient_ID=<?php echo $_GET['Patient_ID']; ?>&Office_ID=<?php echo $_GET['Office_ID']; ?>&First=<?php echo $_GET['First']; ?>&Last=<?php echo $_GET['Last']; ?>&Status=all" <?php if (!(strcmp("all", $_GET['Status']))) {echo "selected=\"selected\"";} ?>>Any Status...</option>
<?php
do {
?>
<option value="scheduler.php?Patient_ID=<?php echo $_GET['Patient_ID']; ?>&Office_ID=<?php echo $_GET['Office_ID']; ?>&First=<?php echo $_GET['First']; ?>&Last=<?php echo $_GET['Last']; ?>&Status=<?php echo $row_appt_status['ID']; ?>"<?php if (!(strcmp($row_appt_status['ID'], $_GET['Status']))) {echo "selected=\"selected\"";} ?>><?php echo $row_appt_status['Status']?></option>
<?php
} while ($row_appt_status = mysql_fetch_assoc($appt_status));
$rows = mysql_num_rows($appt_status);
if($rows > 0) {
mysql_data_seek($appt_status, 0);
$row_appt_status = mysql_fetch_assoc($appt_status);
}
?>
</select>
So, once selected the JumpMenu will link back to the scheduler.php page with URL variables. My scheduler.php page sends the URL variables to events_rec.php where they are used to process the SQL. Here’s a snippet from the scheduler.php javascript:
function doOnLoad() {
...
...
...
scheduler.load("php/events_rec.php?Office_ID=<?php echo $_GET['Office_ID']; ?>&Status=<?php echo $_GET['Status']; ?>");
var dp = new dataProcessor("php/events_rec.php?Office_ID=<?php echo $_GET['Office_ID']; ?>&Status=<?php echo $_GET['Status']; ?>");
It works! There is one downside though… if the user selects an item from the jumpmenu over and over again (clicking between the options in the menu), I eventually get an error box… there is no information in the error box, but when I select “OK” to close the error box, the data still loads properly. So I’m guessing if the SQL is not run completely before the user re-selects from the jumpmenu, the error appears.
My question is:
How can I link the jumpmenu to the javascript instead of linking the jumpmenu to the scheduler.php page and allowing the ‘onload’ script to pass the data. I guess that would solve the error box issues?
Thanks!