Can't open the date time picker

This is a discussion on "Can't open the date time picker" within the JavaScript Forum section. This forum, and the thread "Can't open the date time picker are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jul 3rd, 2007, 07:22
New Member
Join Date: Jun 2007
Location: Malaysia
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Smile Can't open the date time picker

HI! I integrated a js file in my javascript and when click on the calender icon there should be a small calender picker for user to select date. but the problem is when i click on the calender icon there was nothing appear. Where is the problem? Thanks in advance. Here is my code:
<html>
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="javascript" type="text/javascript" src="datetimepicker.js">
//Date Time Picker script- by TengYong Ng of http://www.rainforestnet.com
//Script featured on JavaScript Kit (http://www.javascriptkit.com)
//For this script, visit http://www.javascriptkit.com
</script>
<script language="javascript">
function load() {
document.getElementById('mytable').onclick = getcell;
}
var editwindow = undefined; //glocal variable
var cellEdit = undefined; //glocal variable
function getcell(e){
if(!e) {e=window.event;}
var tgt = e.target || e.srcElement; //get hit target
cellEdit = tgt;
editwindow = open("javascript:","editWindow","width=200,height= 200");
writePageDetail(editwindow.document, tgt);
}
function writePageDetail(doc, cell){
doc.open();
doc.write("<html><head><title>Edit Window</title></head><body>Task Name: "+cell.firstChild.data+"<p><p>");
doc.write("<input type='text' id='text1' value='"+cell.firstChild.data+"'><p>");
doc.write("<input id='demo1' type='text' size='15'><a href='javascript:NewCal('demo1','ddmmyyyy')'>"+
"<img src='cal.gif' width='16' height='16' border='0' alt='Pick a date'></a><p>"); //insert date
doc.write("<input type='button' onclick='opener.rowCallback(document)' value='Ok'>");
doc.write("</body></html>");
doc.close();
}// end writePageDetail
function rowCallback(doc){ //updating value
if (!cellEdit) {return;} // something is wrong
cellEdit.innerHTML = doc.getElementById("text1").value;
cellEdit = undefined;
editwindow.close();
} //end rowCallback
</script>
</head>
<body >
<table border='1'>
<thead>
<tr><td>Task No.</td><td>Task Name</td><td>Ownership</td><td>May</td><td>June</td></tr>
</thead>
<tbody id="mytable" onclick="load()">
<tr>
<td>click 1</td>
<td>click 2</td>
<td>click 3</td>
<td>color</td>
<td>color</td>
</tr>
<tr>
<td>click 4</td>
<td>click 5</td>
<td>click 6</td>
<td>color</td>
<td>color</td>
</tr>
</tbody>
</table>
<p><p>
<input type="button" value="Insert new row" onclick="insert(this.form)">
</body>
</html>
Reply With Quote

Reply

Tags
connecting js script

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Date & Time [Combine] doctypedeclaration JavaScript Forum 3 Mar 12th, 2008 01:22
Changing date format in date picker AdRock JavaScript Forum 1 Aug 1st, 2006 17:16
How to format date/time from input box ? kahpeng Classic ASP 1 Mar 27th, 2006 05:08
Creating Date & Time SweetLou Classic ASP 1 Jan 23rd, 2006 13:55
Server time and date script gribble JavaScript Forum 1 Aug 16th, 2005 09:53


All times are GMT. The time now is 10:36.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43