Xtremer360 Posted February 9, 2009 Share Posted February 9, 2009 When I click on the image to bring up the calender it doesn't do anything. What's wrong with my coding on my php function? And obviously when I'm eventually able to open the calender I want the date that gets chosen to be placed in the bookingdate input field. function booklineup() { print '<script language="JavaScript" src="ts_picker.js"></script>'; print '<h1 class=backstage>Show Booking Management</h1><br />'; print '<table width="100%" class="table2">'; print '<tr>'; print '<td width="150" valign="center" class="rowheading">Show Name:</td>'; print '<td class="row3"><select name="show class="dropdown">'; print '<option value="0">- Select -</option>'; $query = 'SELECT * FROM shownames'; $result = mysql_query ( $query ); while ( $row = mysql_fetch_assoc ( $result ) ) { print "<option value=\"".$row['showname']."\">".$row['showname']."</option>\r"; } print '</select></td>'; print '<td class="row3" width="180"><span class="reduced">Set up in show Name Manager</span></td>'; print '</tr>'; print '<tr>'; print '<td width="150" valign="center" class="rowheading">Label:</td>'; print '<td class="row3"><input type="text" name="label" class="fieldtext40"></td>'; print '<td class="row3" width="180"><span class="reduced">e.g. Consecutive Number, Date</span></td>'; print '</tr>'; print '<tr>'; print '<td width="150" valign="center" class="rowheading">Air Date</td>'; print '<td class="row3"><input type="text" name="bookingdate" class="fieldtext80" value=""><a href="javascript:show_calendar("document.showbooker.bookingdate", document.showbooker.bookingdate.value);"><img src="cal.gif" width="16" height="16" border="0" alt="Click Here to Pick the date"></a></td>'; print '<td class="row3"><span class="reduced">dd-mm-yyyy</span></td>'; print '</tr>'; print '<tr>'; print '<td class="rowheading" width="150" valign="center" class="rowheading">No. of Matches:</td>'; print '<td class="row3"><input type="text" name="numberofmatches" class="fieldtext40"></td>'; print '<td class="row3"><span class="reduced">More can be added later</span></td>'; print '</tr>'; print '<tr>'; print '<td class="rowheading">Country</td>'; print '<td class="row3" colspan="2"><select name="countryid" class="dropdown" onchange="ajaxpage("backstageajax.php?random=625094862&routine=arenas&countryid="+showbooker.countryid.value,"arenaajax");"><option value=0>- Select -</option>'; $query = 'SELECT * FROM arenas'; $result = mysql_query ( $query ); while ( $row = mysql_fetch_assoc ( $result ) ) { print "<option value=\"".$row['country']."\">".$row['country']."</option>\r"; } print '</select></td>'; print '</tr>'; print '<tr>'; print '<td class="rowheading">Arena</td>'; print '<td class="row3" colspan="2"><div id="arenaajax"><select name="arenaid" class="dropdown"><option value="0">- Select Arena -</select><input type="hidden" name="location" value="0"></div></td>'; print '</tr>'; print '</table><br />'; print '<input type="submit" value="Add Booking" class="button"><br /><br />'; print '<input type="button" value="Return to Booking Manager" class="button200"><br /><br />'; print '<h2 class="backstage"><input type="button" value="Return to Main Menu" class="button200"></form></h2>'; } Quote Link to comment Share on other sites More sharing options...
Xtremer360 Posted February 12, 2009 Author Share Posted February 12, 2009 Updated Code But Don't Know How to get it to open: function booklineup() { print '<script language="JavaScript" src="ts_picker.js"></script>'; $type = $_GET['type']; print '<h1 class=backstage>Show Booking Management</h1><br />'; print '<table width="100%" class="table2">'; print '<tr>'; print '<td width="150" valign="center" class="rowheading">Show Name:</td>'; print '<td class="row3"><select name="show class="dropdown">'; print '<option value="0">- Select -</option>'; $query = "SELECT * FROM shownames WHERE `type` = '$type'"; $result = mysql_query ( $query ); while ( $row = mysql_fetch_assoc ( $result ) ) { print "<option value=\"".$row['showname']."\">".$row['showname']."</option>\r"; } print '</select></td>'; print '<td class="row3" width="180"><span class="reduced">Set up in show Name Manager</span></td>'; print '</tr>'; print '<tr>'; print '<td width="150" valign="center" class="rowheading">Label:</td>'; print '<td class="row3"><input type="text" name="label" class="fieldtext40"></td>'; print '<td class="row3" width="180"><span class="reduced">e.g. Consecutive Number, Date</span></td>'; print '</tr>'; print '<tr>'; print '<td width="150" valign="center" class="rowheading">Air Date</td>'; print '<td class="row3"><input type="text" name="bookingdate" class="fieldtext80" value=""><a href="javascript:show_calendar("document.showbooker.bookingdate", document.showbooker.bookingdate.value);"><img src="cal.gif" width="16" height="16" border="0" alt="Click Here to Pick the date"></a></td>'; print '<td class="row3"><span class="reduced">dd-mm-yyyy</span></td>'; print '</tr>'; print '<tr>'; print '<td class="rowheading" width="150" valign="center" class="rowheading">No. of Matches:</td>'; print '<td class="row3"><input type="text" name="numberofmatches" class="fieldtext40"></td>'; print '<td class="row3"><span class="reduced">More can be added later</span></td>'; print '</tr>'; print '<tr>'; print '<td class="rowheading">Country</td>'; print '<td class="row3" colspan="2"><select name="countryid" class="dropdown" onchange="ajaxpage("backstageajax.php?random=625094862&routine=arenas&countryid="+showbooker.countryid.value,"arenaajax");"><option value=0>- Select -</option>'; $query = 'SELECT * FROM arenas GROUP BY `country` ORDER BY `country`'; $result = mysql_query ( $query ); while ( $row = mysql_fetch_assoc ( $result ) ) { print "<option value=\"".$row['country']."\">".$row['country']."</option>\r"; } print '</select></td>'; print '</tr>'; print '<tr>'; print '<td class="rowheading">Arena</td>'; print '<td class="row3" colspan="2"><div id="arenaajax"><select name="arenaid" class="dropdown"><option value="0">- Select Arena -</select><input type="hidden" name="location" value="0"></div></td>'; print '</tr>'; print '</table><br />'; print '<input type="submit" value="Add Booking" class="button"><br /><br />'; print '<input type="button" value="Return to Booking Manager" class="button200"><br /><br />'; print '<h2 class="backstage"><input type="button" value="Return to Main Menu" class="button200"></form></h2>'; } Quote Link to comment Share on other sites More sharing options...
Xtremer360 Posted February 18, 2009 Author Share Posted February 18, 2009 *bump* Anyone know? Quote Link to comment Share on other sites More sharing options...
seventheyejosh Posted February 18, 2009 Share Posted February 18, 2009 I'm not sure what the error is, cause im not to java savvy... but i've found this to be an amazing picker for most of my coding: http://www.zapatec.com/website/main/coding.jsp the only thing to remember is to make sure your input and button trigger names match the ones defined in the script. Sorry i couldn't be of more assistance. 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.