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.
|
|
|
|
|
![]() |
||
Can't open the date time picker
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
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.
<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> |
|
|
![]() |
| Tags |
| connecting js script |
| Thread Tools | |
|
|
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 |