virchull
Junior Member
Posts: 6
Registered: 3/1/2008
Location: New York
Member Is Offline
|
| posted on 3/1/2008 at 12:41 AM |
|
|
some things work, but not popup
I am a novice, and know very little about JavaScript, but here goes. I have the 3 calendarx.js files, calendar.html, and index.html files in the same
directory as the web page. I am developing locahost on my own PC with Apache 2.2 and PHP. On the web page, I get Pick Date in the form box and I see
a small calendar icon to the right of the form box, so some things are working. But, no calendar pops up when I click on the form box. I've stared
at a lot of code on this forum and it looks really similar, but I don't see the problem. Help would be appreciated. An extract of my code is below.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<link type="text/css" rel="stylesheet" href="getmeshelter.css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Real estate " />
<meta name="keywords" content="apartment rental " />
<script language="JavaScript"> src="calendar1.js">
<script language="JavaScript"> src="calendar2.js">
</script>
<?php
print"<title>$title></title>";
?>
</head>
<body>
.
.
.
<ul>
.
.
<li>
<!--ACCEPT AVAILABILITY DATE-->
<!--This form has a name="calendarSelector" because the Tigra JavaScript calendar documentation seems to require a form name-->
<div id="inputRowElement">
<span class="label">Date Available: </span>
<span class="formwindow">
<form method="post"
name="calendarSelector"
action="testforminputreturn4.php">
<label for="dateAvailable"> </label> <!--line can be removed. span class above provides
label-->
<input type="text" name="dateAvailable" id="dateAvailable" value="Pick date" size="10" maxlength="20" />
<a href="javascript:cal1.popup();"><img src="img/cal.gif" width="16" height="16" border="0" alt="Select
date"></a><br>
</form>
<script language="JavaScript">
var cal1=new calendar1(document.forms['calendarSelector'].elements['dateAvailable']);
cal1.year_scroll = true;
cal1.time_comp = false;
</script>
</span>
</div>
</li>
.
.
</ul>
|
|
|
virchull
Junior Member
Posts: 6
Registered: 3/1/2008
Location: New York
Member Is Offline
|
| posted on 3/3/2008 at 12:55 AM |
|
|
I noticed that I did not close both of the <script> tags in the header. I fixed that, but it still does not pop up.
|
|
|
|