aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Calendar Popup in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Calendar Popup in jsp" Watch "Calendar Popup in jsp" New topic
Author

Calendar Popup in jsp

Chitti pokala
Ranch Hand

Joined: Jan 11, 2005
Posts: 46
Hi I am trying to use Calendar Popup in my JSP. But I am getting an error
cal is null or not an object

< script type="text/javascript" language="Javascript" src="<%=request.getContextPath()%>/js/calendarPopup.js"></script>
<SCRIPT LANGUAGE="JavaScript">

var cal = new CalendarPopup();
cal.showYearNavigation();
cal.showYearNavigationInput();

</SCRIPT>

<INPUT TYPE="text" NAME="date1" VALUE="18-Jan-2005" SIZE=25>
<A HREF="#" ="cal.select(date1,'anchor1','dd-NNN-yyyy'); return false;" NAME="anchor1" ID="anchor1"><img src="images/cal.gif" width="16" height="16" ></A>

Please let me know where I am wrong..............
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61648
    
  67

Please let me know where I am wrong


Most recently, posting in the wrong forum. The Javascript on your page has little to do with the JSP that generated it. Moving to the HTML/Javascript forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
What is the error? Where did you find the code? Is the js file linked correctly?

Eric
Chitti pokala
Ranch Hand

Joined: Jan 11, 2005
Posts: 46
yes, the js file linked well. I am that variable cal is null or not an object.

Please let me know....
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
where did you get this calendar?
Yuriy Zilbergleyt
Ranch Hand

Joined: Dec 13, 2004
Posts: 429
Well if you know that the js file is linked correctly, the problem has to be inside the js file itself.

-Yuriy
Chitti pokala
Ranch Hand

Joined: Jan 11, 2005
Posts: 46
The problem is not with the js file because I am using the same js for normal html and it works fine. And I include this in my jsp its not working..........
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61648
    
  67

Have you done a View Source to make sure that your HTML file is as you expect?
Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256
< script type="text/javascript" language="Javascript" src="<%=request.getContextPath()%>/js/calendarPopup.js"></script>
<SCRIPT LANGUAGE="JavaScript">


The js file name is calendarPopup.js and

var cal = new CalendarPopup();


Is this correct?


Life called,so here I am.<br />Cheers<br />Niki.:-)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calendar Popup in jsp