You might take a look at AjaxUtils.addScriptResourceInHead if you are using
Project Wonder ;)

On 8/9/07 3:06 PM, "Daniele Corti" <[EMAIL PROTECTED]> wrote:

> 
> 
> 2007/8/9, Sigurður E. Vilhelmsson <[EMAIL PROTECTED]>:
>> Hi all,
>> 
>> How does one go about including a javascript in a page?  Specifically,
>> I am trying to incorporate TinyMCE (or FCKEditor) in a form.
>> 
>> I have the following in my html:
>> 
>> <script language="_javascript_" type="text/_javascript_"
>> src="/jscripts/tiny_mce/tiny_mce.js"></script>
>>         <script language="_javascript_" type="text/_javascript_">
>>                         tinyMCE.init({
>>                         mode : "textareas"
>>                         });
>>         </script>
>> <webobject name="Form">
>> Stutt lýsing: <webobject name = "ShortDescription"></webobject>
>> 
>> and the follwing in my wod:
>> 
>> ShortDescription: WOText {
>>         id = "myTextArea";
>>         name = "myTextArea";
>>         value = courseDescription.shortDescription;
>>         cols = 70;
>>         rows = 10;
>>         mce_editable = "true";
>> }
>> 
>> The questions I have are the following:
>> With the above src reference, where exactly in my filesystem do I
>> place the jscripts folder ?
>> 
>> Do I import the jscripts folder into my project or is the reference to
>> it enough?
> 
> Look, in your case I think the best way should be to import the js and css (if
> i remember how tiny works), inside the WebServiceResources folder of your
> project. This is because you don't need to move many things if you need to
> migrate your app.
> 
> second to be sure about your path, use something like this:
> 
> <script language="_javascript_" type="text/_javascript_" src="<wo:WOString
> value=$searchStr />"></script>
> 
> 
> public String searchStr()
> {
>   return application().resourceManager().urlForResourceNamed("tiny_mce.js",
> null, null, context().request());
> }
> 
> have a look of WOReourceManager.urlForResourceNamed ! it is very usefull also
> for localization!
> 
>> Will the editor work in DirectConnect mode, or only after I deploy?
>> 
>> Any other hints, tips or links to documentation appreciated.
>> 
>> Best regards,
>> Sigurdur
>>  _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      ([email protected])
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/ildenae%40gmail.com
>> 
>> This email sent to [EMAIL PROTECTED]
> 
> 


 
    Með vegsemd og virðingu,

    Logi Helgu
    Umferðarstofa

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to