Jump to content

[SOLVED] CalenderPopUp Doesn't Load


Xtremer360

Recommended Posts

Does anyone know why when I click on Date Selector it won't pop up with the CaldenderPopUp? It just doesn't so anything.

 

 

print '<SCRIPT LANGUAGE="JavaScript" SRC="CalendarPopup.js"></SCRIPT>';

print '<SCRIPT LANGUAGE="JavaScript"> var cal = new CalendarPopup(); </SCRIPT>';

 

 

Date:<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>

Link to comment
Share on other sites

Okay this has nothing to do with PHP.. try the HTML/CSS/Javascript section..

 

but it looks like your missing the form tag.. and a print command

 

try this

<?php
print '<SCRIPT LANGUAGE="JavaScript" SRC="CalendarPopup.js"></SCRIPT>';
print '<SCRIPT LANGUAGE="JavaScript"> var cal = new CalendarPopup(); </SCRIPT>';

print "<form>";

print 'Date:<input type="text" name="date" readonly="readonly" />';
print '<a href="#" onClick="cal.select(document.forms[\'form1\'].date,\'anchor1\',\'MM/dd/yyyy\'); return false;"NAME="anchor1" ID="anchor1">Date Selector</a>';

print "</form>";
?>

Link to comment
Share on other sites

Okay well this should work,

try this in its own file (make sure you have the JS in the same folder)

 

<?php
echo "<SCRIPT LANGUAGE=\"JavaScript\" SRC=\"CalendarPopup.js\"></SCRIPT>";
echo "<SCRIPT LANGUAGE=\"JavaScript\"> var cal = new CalendarPopup(); </SCRIPT>";
echo "<form name=\"form1\">";
echo "Date:<input type=\"text\" name=\"date\" readonly=\"readonly\" />";
echo "<a href=\"#\" onClick=\"cal.select(document.forms['form1'].date,'anchor1','MM/dd/yyyy'); return false;\" NAME=\"anchor1\" ID=\"anchor1\">Date Selector</a>";
echo "</form>";
?>

Link to comment
Share on other sites

Here's all my code:

 

<?php
print '<center><caption><strong>Add A Show</strong></caption></center>';
print '<SCRIPT LANGUAGE="JavaScript" SRC="CalendarPopup.js"></SCRIPT>';
print '<SCRIPT LANGUAGE="JavaScript"> var cal = new CalendarPopup(); </SCRIPT>';
print '<form enctype="multipart/form-data"  method="post">';
print '<input name="MAX_FILE_SIZE" type="hidden" value="100000">';
print '<table border="1" style="margin: auto; width: 60%;">';
print '<tr><td>Show Type:</td> ';
print '<td><select name="type"><option value="">Select a Show Type</option>';

      			 $query = 'SELECT type FROM showtypes ORDER BY type';

			$result = mysql_query($query);

		while ($row = mysql_fetch_assoc($result)){

				echo "<option value=\"{$row['type']}\">{$row['type']}</option>\r";

			}			

print '</select></td></tr>';
print '<tr><td>Show Name:</td> ';
print '<td><input name="showname" type="text"></td></tr>';
print '<tr><td>Location:</td> ';
print '<td><input name="location" type="text"></td></tr>';
print '<tr><td>Arena:</td> ';
print '<td><input name="arena" type="text"></td></tr>';
print '<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>';
print '<tr><td>Show Image:</td> ';
print '<td><input name="uploadedfile" type="file"></td></tr>';
print '<tr><th colspan=2><input type="submit" name="submit" value="Add Show Name" /><input name="sumbitted" type="hidden" value="TRUE"></th></tr></table></form><br><br><br>';
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.