I'm becoming newly acquainted with SilverStream 3.5, and am trying to embed a javascript calendar 'date chooser' popup control into my SilverStream page. I've been able to use this control successfully with previous html/javascript implementations. It consists of an initial html page that is opened in a new popup window, which invokes commands on a javascript source file (calendar.js) to construct a frameset for the window. Here's the relevant code in the originating page:
<SCRIPT LANGUAGE="JavaScript" SRC="calendar.js"></SCRIPT>
...
<A HREF="javascript:doNothing()" onClick="setDateField(document.myForm.myDateField);top.newWin =window.open('calendar.html','cal','dependent=yes,width=210,height=230,screenX=200,screenY=300,titlebar=yes')">
<IMG SRC="calendar.gif" BORDER=0>
</A>
Then, here's the relevant code within 'calendar.html' that is opened in a separate window:
<P><SCRIPT LANGUAGE="JavaScript">
<P>
<P>
<P> // USE THE JAVASCRIPT-GENERATED DOCUMENTS (calDocTop, calDocBottom) IN THE
FRAMESET
<P> calDocFrameset =
<P> "<FRAMESET ROWS='70,*' FRAMEBORDER='0'>\n" +
<P> " <FRAME NAME='topCalFrame' SRC='javascriptarent.opener.calDocTop' SCROLLING
='no'>\n" +
<P> " <FRAME NAME='bottomCalFrame' SRC='javascriptarent.opener.calDocBottom' SCROLLING='no'>\n" +
<P> "</FRAMESET>\n";
<P>
<P> document.write(calDocFrameset);
<P>
<P></SCRIPT>
I'm not sure how to quickly implement this code within SilverStream's framework. I can get the window with the calendar.html to open in a popup window using agScriptHelper.openWindow(..). However, the window is having trouble accessing/invoking commands on the javascript source.
Given that SilverStream is representing javascript in java methods, how can I set up the calendar.js javascript source to be accessible from my calendar.html code?
Thanks for taking a look at this.
<SCRIPT LANGUAGE="JavaScript" SRC="calendar.js"></SCRIPT>
...
<A HREF="javascript:doNothing()" onClick="setDateField(document.myForm.myDateField);top.newWin =window.open('calendar.html','cal','dependent=yes,width=210,height=230,screenX=200,screenY=300,titlebar=yes')">
<IMG SRC="calendar.gif" BORDER=0>
</A>
Then, here's the relevant code within 'calendar.html' that is opened in a separate window:
<P><SCRIPT LANGUAGE="JavaScript">
<P>
<P>
<P> // USE THE JAVASCRIPT-GENERATED DOCUMENTS (calDocTop, calDocBottom) IN THE
FRAMESET
<P> calDocFrameset =
<P> "<FRAMESET ROWS='70,*' FRAMEBORDER='0'>\n" +
<P> " <FRAME NAME='topCalFrame' SRC='javascriptarent.opener.calDocTop' SCROLLING
='no'>\n" +
<P> " <FRAME NAME='bottomCalFrame' SRC='javascriptarent.opener.calDocBottom' SCROLLING='no'>\n" +
<P> "</FRAMESET>\n";
<P>
<P> document.write(calDocFrameset);
<P>
<P></SCRIPT>
I'm not sure how to quickly implement this code within SilverStream's framework. I can get the window with the calendar.html to open in a popup window using agScriptHelper.openWindow(..). However, the window is having trouble accessing/invoking commands on the javascript source.
Given that SilverStream is representing javascript in java methods, how can I set up the calendar.js javascript source to be accessible from my calendar.html code?
Thanks for taking a look at this.