Xtremer360 Posted October 21, 2008 Share Posted October 21, 2008 Why isn't my CalenderPopUp working correctly when I click Date Selector? Nothing happens when you click it. <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script type="text/javascript"> function ajaxGet() { var xmlHttp; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert("Your browser does not support AJAX!"); return false; } } } xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4) { document.getElementById('shownam').innerHTML = xmlHttp.responseText; ajaxGetL(); } } //alert("Selected: " + document.getElementById("ajax1").value); xmlHttp.open("GET","showAjax.php?type=" + document.getElementById("ajax1").value + "&rand=" + Math.random(),true); xmlHttp.send(null); } function ajaxGetL() { //alert("CALLED"); var xmlHttp; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert("Your browser does not support AJAX!"); return false; } } } xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4) { document.getElementById('label').value = xmlHttp.responseText; } } //alert("Selected: " + document.getElementById("ajax1").value); xmlHttp.open("GET","showAjax.php?label=" + document.getElementById("names").value + "&rand=" + Math.random(),true); xmlHttp.send(null); } </script> </head> <body> <?php /* setupshow.php */ /* This form after submission takes the results of the form and makes a new show ready for adding matches. */ require ('database.php'); print '<center><caption><strong>Create A Show</strong></caption></center>'; echo '<table border="1" align="center" style="margin: auto; width: 60%;">'; echo '<SCRIPT LANGUAGE="JavaScript" SRC="CalendarPopup.js"></SCRIPT>'; echo '<SCRIPT LANGUAGE="JavaScript"> var cal = new CalendarPopup(); </SCRIPT>'; echo '<form action="setupshow.php" method="post" name="myForm">'; echo '<tr><td>Weekly Show or Pay-Per View:</td><td><select name="type" id="ajax1" onChange="ajaxGet();"><option value="">Select a Show Type</option>'; $query = 'SELECT DISTINCT type FROM shows ORDER BY type'; $result = mysql_query($query); while ($row = mysql_fetch_assoc($result)){ echo "<option value=\"{$row['type']}\">{$row['type']}</option>\r"; } echo '</select></td></tr>'; echo "<tr><td>Show Name:</td><td><div id=\"shownam\"><select id=\"names\" onChange=\"ajaxGetL();\"></select></div></td></tr>"; echo '<tr><td>Show Label:</td><td><input name="showlabel" id="label" type="text" readonly="true" size="5"></td></tr>'; echo '<tr><td>Date:</td><td><input type="text" name="date" readonly="readonly" /> <a href="#" onClick="cal.select(document.forms[\'form1\'].date,\'anchor1\',\'MM/dd/yyyy\'); return false;"NAME="anchor1" ID="anchor1">Date Selector</a></td></tr>'; echo '<tr><td>Location:</td><td><input name="location" type="text"></td></tr>'; echo '<tr><td>Arena:</td><td><input name="arena" type="text"></td></tr>'; echo '<tr><th colspan=2><input name="submit" type="submit" value="Submit"><input name="sumbitted" type="hidden" value="TRUE"></th></tr></table></form>'; ?> </body> </html> Link to comment https://forums.phpfreaks.com/topic/129350-solved-calenderpopup-doesnt-load/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.