jhay_are
Junior Member
Posts: 9
Registered: 2/20/2007
Location: Manila,Philippines
Member Is Offline
|
| posted on 2/20/2007 at 03:14 AM |
|
|
cal5.popup(); is undefine
i have a problem regarding the link <a href="javascript:cal5.popup();"><img src='<%= response.encodeURL("/img/cal.gif") %>'
width="16" height="16" border="0" alt="Click Here to Pick up the date"></a>, the javascript:cal5.popup is undefine. is there any one
knows how to solve this prob... your help is very much appreciated....
jhay_are has attached this image:
|
|
|
tigra
Administrator
Posts: 1926
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 2/20/2007 at 09:19 AM |
|
|
look in the sample index.html for the following code
| Code: |
var cal5 = new calendar2(document.forms['tstest'].elements['input5']);
cal5.year_scroll = true;
cal5.time_comp = false;
|
This is where ca5 is defined and configured.
|
|
|
jhay_are
Junior Member
Posts: 9
Registered: 2/20/2007
Location: Manila,Philippines
Member Is Offline
|
| posted on 2/20/2007 at 06:19 PM |
|
|
thanx for the reply...but im running the code in a struts portlet and the problem is everytime i run the code my form name always change... my form
name must be dynamic, how can i do that???
thank you again...
|
|
|
tigra
Administrator
Posts: 1926
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 2/20/2007 at 10:32 PM |
|
|
you can refer to the form by the index.
document.forms[0] refers to the first form in the document. You can also specify the unique id for the input and use it to obtain the object reference
thus avoiding the need for the form reference.
|
|
|
jhay_are
Junior Member
Posts: 9
Registered: 2/20/2007
Location: Manila,Philippines
Member Is Offline
|
| posted on 3/5/2007 at 07:41 AM |
|
|
Help pls.....
i can generate popup now but the problem is the popup that has been generated is the same page, not a calendar, i included the calendar.html in the
project but still it is generating the same page, wat is the problem with this? can u pls help me.... ur help is very appreciated
jhay_are has attached this image:
|
|
|
tigra
Administrator
Posts: 1926
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 3/5/2007 at 03:26 PM |
|
|
check out the URL in window.open(..) statement inside calendar?.js file
It should point to calendar.html file. Also try requesting calendar.html directly in the browser to make sure it returns the right page (it will show
the calendar header when requested directly).
|
|
|
jhay_are
Junior Member
Posts: 9
Registered: 2/20/2007
Location: Manila,Philippines
Member Is Offline
|
| posted on 3/6/2007 at 12:54 AM |
|
|
var obj_calwindow = window.open(
'calendar.html?datetime=' + this.dt_current.valueOf()+ '&id=' + this.id,
'Calendar', 'width=200,height='+(this.time_comp ? 215 : 190)+
',status=no,resizable=no,top=200,left=200,dependent=yes,alwaysRaised=yes'
);
obj_calwindow.opener = window;
obj_calwindow.focus();
This are the code in window.open method, you told me to try requesting calendar.html directly in the browser to make sure it returns the right page
(it will show the calendar header when requested directly). how can i do that??? thanx again for the help.
|
|
|
tigra
Administrator
Posts: 1926
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 3/6/2007 at 01:04 AM |
|
|
for example if the address of the page is:
http://www.softcomplex.com/products/tigra_calendar/demo1.html
then the path to the calendar.html is
http://www.softcomplex.com/products/tigra_calendar/calendar.html
put that in the browser's address bar and press enter.
|
|
|
jhay_are
Junior Member
Posts: 9
Registered: 2/20/2007
Location: Manila,Philippines
Member Is Offline
|
| posted on 3/6/2007 at 01:04 AM |
|
|
i've put this code in window.open method
var obj_calwindow = window.open(
'file:///D:/Jhay_are/Calendar/calendar.html?datetime=' + this.dt_current.valueOf()+ '&id=' + this.id,
'Calendar', 'width=200,height='+(this.time_comp ? 215 : 190)+
',status=no,resizable=no,top=200,left=200,dependent=yes,alwaysRaised=yes'
);
obj_calwindow.opener = window;
obj_calwindow.focus();
and here is the screenshot.
jhay_are has attached this image:
|
|
|
jhay_are
Junior Member
Posts: 9
Registered: 2/20/2007
Location: Manila,Philippines
Member Is Offline
|
| posted on 3/6/2007 at 01:09 AM |
|
|
i've put the this path http://www.softcomplex.com/products/tigra_calendar/calendar.html in window.open but the popupWindow is still the same
var obj_calwindow = window.open(
'http://www.softcomplex.com/products/tigra_calendar/calendar.html?datetime=' + this.dt_current.valueOf()+ '&id=' + this.id,
'Calendar', 'width=200,height='+(this.time_comp ? 215 : 190)+
',status=no,resizable=no,top=200,left=200,dependent=yes,alwaysRaised=yes'
);
obj_calwindow.opener = window;
obj_calwindow.focus();
|
|
|
tigra
Administrator
Posts: 1926
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 3/6/2007 at 01:09 AM |
|
|
if you access the HTML page via the web server then you should call calendar.html using the same method. In your case the path should start from http://localhost:9081/
|
|
|
jhay_are
Junior Member
Posts: 9
Registered: 2/20/2007
Location: Manila,Philippines
Member Is Offline
|
| posted on 3/6/2007 at 02:01 AM |
|
|
hi again,
i tried to use http://localhost:9081/wps/portal/!ut/p/.cmd/html/js/calendar.html
and still doesn't work and here's the screenshot.
jhay_are has attached this image:
|
|
|
tigra
Administrator
Posts: 1926
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 3/6/2007 at 02:08 AM |
|
|
try requesting http://localhost:9081/wps/portal/!ut/p/.cmd/html/js/calendar.html
directly in your browser. If it doesn't show the calendar grid then calendar.html is probably missing and your server returns customized "file not
fund" message, or your web server is mis-configured.
|
|
|
jhay_are
Junior Member
Posts: 9
Registered: 2/20/2007
Location: Manila,Philippines
Member Is Offline
|
| posted on 3/6/2007 at 02:12 AM |
|
|
yes the calendar grid does not show in the browser, how can i know the path of the calendar? im very very thankful for ur help, u're such a nice
person, ur stil not tired on helping me
|
|
|
tigra
Administrator
Posts: 1926
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 3/6/2007 at 02:18 AM |
|
|
find the directory in your local system which is mapped by the server to http://localhost:9081/wps/portal/!ut/p/.cmd/html/js/
and make sure calendar.html is there. Copy it there if it's missing.
|
|
|
jhay_are
Junior Member
Posts: 9
Registered: 2/20/2007
Location: Manila,Philippines
Member Is Offline
|
| posted on 3/6/2007 at 03:13 AM |
|
|
yes the calendar.html is there
|
|
|
tigra
Administrator
Posts: 1926
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 3/6/2007 at 03:18 AM |
|
|
then your web server should send it to the browser when requested. You're either looking in wrong place or there is some server mis-configuratoin.
|
|
|