Re: Newbie JavaScript Question
Re: Newbie JavaScript Question
- Subject: Re: Newbie JavaScript Question
- From: David Holt <email@hidden>
- Date: Wed, 26 Jul 2006 10:13:01 -0700
Hi Mike,
There are a number of things you can do. You can include the script in the head section of the page where you want to call it. You can include it in a page template. You can include your script as a WebServer resource and bind it to WOJavaScript (you can find this on the palette in WOBuilder).
http://developer.apple.com/documentation/WebObjects/Reference/DynamicElements/WOJavaScript/chapter_21_section_1.html
I do the latter in my page templates so that I can call this particular script from any input form:
<head> <WEBOBJECT NAME=CalendarPopupJavaScript></WEBOBJECT> </head>
CalendarPopupJavaScript: WOJavaScript { scriptSource = "calendar.js"; hideInComment = true; }
One thing that you must look out for if you are deploying using XCode is that under the WebServer resources target, ".js" files end up in the Compile Sources folder. They must be manually moved to the Copy Bundle Resources folder.
David On 26 Jul 2006, at 9:45 AM, Chip Myers wrote: Hi, I'm trying to incorporate some _javascript_ into my webobjects file. Can anyone point me to a good tutorial for doing this?
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden