Groups > IBM > Studio400 > Re: I am not understanding how to call a Javascript Function from




I am not understanding how to call a Javascript Function
from a

I am not understanding how to call a Javascript Function from a
Mon, 18 Jun 2007 10:57:32 EDT
I am attempting to create a popup calendar window using the code from this
example:
http://www.mattkruse.com/javascript/calendarpopup/simple.html

I don't understand the following:

-Where do I put all the javascript functions in my webfaced application?  Do I
add them to the webfacing.js file?  

-How do I get the statement ">SCRIPT
LANGUAGE="JavaScript">var cal = new
CalendarPopup();>/SCRIPT>" into the HEAD tag of the screen I want to
use it on?  Does it actually need to be in the HEAD tag? I realize that I can
just go in and modify the screenname.jsp file and add it, but I want to put it
somewhere in the DDS so I don't loose it the next time I "convert" the
DDS.

I understand and can code in JavaScript, HTML, XML, but I am just not
understanding how I can get the code into the DDS through Code Designer and have
it function properly.

Thanks,

Chad
Post Reply
Re: I am not understanding how to call a Javascript Function from
Mon, 18 Jun 2007 16:07:45 -040
NFCO wrote:
> I am attempting to create a popup calendar window using the code from this
example:
> http://www.mattkruse.com/javascript/calendarpopup/simple.html
> 
> I don't understand the following:
> 
> -Where do I put all the javascript functions in my webfaced application? 
Do I add them to the webfacing.js file?  
> 
> -How do I get the statement ">SCRIPT
LANGUAGE="JavaScript">var cal = new
CalendarPopup();>/SCRIPT>" into the HEAD tag of the screen I want to
use it on?  Does it actually need to be in the HEAD tag? I realize that I can
just go in and modify the screenname.jsp file and add it, but I want to put it
somewhere in the DDS so I don't loose it the next time I "convert" the
DDS.
> 
> I understand and can code in JavaScript, HTML, XML, but I am just not
understanding how I can get the code into the DDS through Code Designer and have
it function properly.
> 
> Thanks,
> 
> Chad
> 

Here is a good Google query that might help:
http://www.google.ca/search?q=webfacing+javascript+site%3Aibm.com
And it will pick up this that is in the product docs that answers at 
least one of your questions:
http://publib.boulder.ibm.com/infocenter/iadthelp/v7r0/index.jsp?topic=/com.ibm.
etools.iseries.webfacing.doc/topics/twfcjsl.html

The record jsp's only generate a segment of the page associated with a 
particular record.  If you want it in the <head> section of the page 
then the likely place to put that would be in pagebuilder.jsp.

Post Reply
Re: I am not understanding how to call a Javascript Function from
Tue, 26 Jun 2007 15:52:19 -040
NFCO wrote:
> I am attempting to create a popup calendar window using the code from this
example:
> http://www.mattkruse.com/javascript/calendarpopup/simple.html
> 
> I don't understand the following:
> 
> -Where do I put all the javascript functions in my webfaced application? 
Do I add them to the webfacing.js file?  
> 
> -How do I get the statement ">SCRIPT
LANGUAGE="JavaScript">var cal = new
CalendarPopup();>/SCRIPT>" into the HEAD tag of the screen I want to
use it on?  Does it actually need to be in the HEAD tag? I realize that I can
just go in and modify the screenname.jsp file and add it, but I want to put it
somewhere in the DDS so I don't loose it the next time I "convert" the
DDS.
> 
> I understand and can code in JavaScript, HTML, XML, but I am just not
understanding how I can get the code into the DDS through Code Designer and have
it function properly.
> 
> Thanks,
> 
> Chad
> 

Also there is a good example here about how to add a calendar pop-up to 
a WF app.  It uses the Yahoo calendar not Matt Kruse's but probably the 
way to insert it into WF would be similar and get you on the right track.

http://wdsc.wordpress.com/2007/04/03/hi-and-my-first-post/

Post Reply
about | contact