• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Newbie JavaScript Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Newbie JavaScript Question (From: Chip Myers <email@hidden>)

  • Prev by Date: Newbie JavaScript Question
  • Next by Date: Newbie : Where can i find the source code for the examples in George Ruzek Book ?
  • Previous by thread: Newbie JavaScript Question
  • Next by thread: Newbie : Where can i find the source code for the examples in George Ruzek Book ?
  • Index(es):
    • Date
    • Thread