URGENT HELP!

Hi,

I have a jsp page that calls a Pop up Javascript calendar.

In the Jsp page the user can select an event for registration. He then needs to select a date for which the event is to be registered for. If the event has already been booked for that date, that particular date needs to be colored differently. Now, my calendar is a javascript pop up, so, how do I pass the eventid and/or the date from jsp to Javascript...?

Please..any help is appreciated!

[487 byte] By [geetuR] at [2007-9-26 1:30:57]
# 1

Hi,

I have a question is calendar a html popup?

I think u doing something like this

assume:- in ur jsp

win=window.open("calendar.html","cal");

it will open ur calendar page

also use a hidden field in ur jsp:

<input type="hidden" value="EVENT;DATE" name="hidd">

now u can access the value "EVENT;DATE" in calendar.html

<body onload="func()">

function func()

{

var event_date;

event_date=opener.document.formname.hidd.value;

}

Regards

zakir hussain

zakir_sh at 2007-6-29 1:29:46 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Yes, you are right.....I do access a html page in my jsp. The code for which looks like this in the jsp:

*** JSP:

I would like to run my PR campaign on Dates:

<INPUT TYPE="TEXT" NAME="date">

<A HREF="javascript:doNothing()" onClick="setDateField(document.PR.date); top.newWin = window.open('js/calendar.html', 'cal', 'dependent=yes, width=210, height=300, screenX=200, screenY=300, titlebar=yes')">

<IMG SRC="/images/calendar.gif" BORDER=0 height="16" width="16"></A>

*******

And the calendar.HTML looks like this:

<HTML>

<HEAD>

<TITLE>JavaScript</TITLE>

</HEAD>

<SCRIPT LANGUAGE="JavaScript">

//newWin = window;

// USE THE JAVASCRIPT-GENERATED DOCUMENTS (calDocTop, calDocBottom) IN THE FRAMESET

calDocFrameset =

"<FRAMESET ROWS='70,*' FRAMEBORDER='0'>\n" +

" <FRAME NAME='topCalFrame' SRC='javascript:parent.opener.calDocTop' SCROLLING='no'>\n" +

" <FRAME NAME='bottomCalFrame' SRC='javascript:parent.opener.calDocBottom' SCROLLING='no'>\n" +

"</FRAMESET>\n";

document.write(calDocFrameset);

function closeMe(){

window.close();

}

</SCRIPT>

</HTML>

**********

I have to select the date from the DB and then pass it..to the JS..

Please help me....Its real urgent!!!

geetuR at 2007-6-29 1:29:46 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Hi,

First store the date and event in a hidden field in your jsp:

then in calendar.html (here you are using frames) so you dont have a <body> tag you will have a <FRAME> tag before <frameset>

now in ur calendar.html

you can write it as

function frame_onload()

{

top.opener.document.jspformname.hidd.value;

}

<FRAME onload="frame_onload()">

document.write("");

</FRAME>

zakir_sh at 2007-6-29 1:29:46 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
Sorry to trouble u again...but I am confused..Can u please tell me again..?Thanks!
geetuR at 2007-6-29 1:29:47 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...