You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Dawn <pe...@gmail.com> on 2006/06/07 05:38:16 UTC

JavaScript outside the body tag

hi all,
tapestry wouldnt let me reference a javascript file, outside a body
tag. when i put the actual code inline it works fine, but if i make a
ref to that file, it falls over.
any ideas on how to fix this.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: JavaScript outside the body tag

Posted by Peter Dawn <pe...@gmail.com>.
yep, i cant find any other way of putting the script component outside
the body tag. so i am going to just reference an external js file. and
that seems to work for now.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: the cycle of a component and de page in a submit

Posted by a a <al...@yahoo.com>.
hello, some one can help me i haven't find the
solution 

place help

alvaro tovar

--- a a <al...@yahoo.com> wrote:

> 
> i have a componenet with a property selection, a
> hidden with a listener, this component is in the
> page
> in a Form,  
> i am tinking that this is the cycle:

> page begin render page rewind
> seting propertys page
> page begin render componenet rewind
> render component rewind
> seting propertys component
> page begin render normal page
> rendr component normal
> page begin render normal component
> is ok this?
> 
> thanks
> alvaro andres tovar
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail:
> users-help@tapestry.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


the cycle of a component and de page in a submit

Posted by a a <al...@yahoo.com>.
i have a componenet with a property selection, a
hidden with a listener, this component is in the page
in a Form,  
i am tinking that this is the cycle
page begin render page rewind
seting propertys page
page begin render componenet rewind
render component rewind
seting propertys component
page begin render normal page
rendr component normal
page begin render normal component
is ok this?

thanks
alvaro andres tovar


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: JavaScript outside the body tag

Posted by Shing Hing Man <ma...@yahoo.com>.
A Script component must be enclosed by a Body
component. Please see the following details.

http://jakarta.apache.org/tapestry/tapestry/ComponentReference/Script.html


Shing 

--- Peter Dawn <pe...@gmail.com> wrote:

> i am already using the javascript component for
> this. but i am unable
> to put this component outside the body tag
> (inbetween <html> and
> <body>) in the HTML.
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail:
> users-help@tapestry.apache.org
> 
> 


Home page :
  http://uk.geocities.com/matmsh/index.html

Send instant messages to your online friends http://uk.messenger.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: JavaScript outside the body tag

Posted by Peter Dawn <pe...@gmail.com>.
i am already using the javascript component for this. but i am unable
to put this component outside the body tag (inbetween <html> and
<body>) in the HTML.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: JavaScript outside the body tag

Posted by Shing Hing Man <ma...@yahoo.com>.
An alternative is to wrap your javascript in a Script
component. In .script file, just use the
include-script
element to include your javascript.


Here is a sample.

preview.script :

  <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script PUBLIC
        "-//Apache Software Foundation//Tapestry
Script Specification 3.0//EN"
       
"http://jakarta.apache.org/tapestry/dtd/Script_3_0.dtd">

<script>

<!-- path is within the classpath -->
<include-script
resource-path="/javascript/preview.js"/>

</script> 

=====================
In .page

<component id="previewScript" type="Script">   
       <!-- preview.script is placed in the same
directory as this .page
        -->  
       <binding name="script"
value="literal:preview.script"/>       
   </component>

=============
In .html  :
<body jwcid="@Body">
  <span jwcid="previewScript"/>


=============
Shing 

--- Peter Dawn <pe...@gmail.com> wrote:

> hi all,
> tapestry wouldnt let me reference a javascript file,
> outside a body
> tag. when i put the actual code inline it works
> fine, but if i make a
> ref to that file, it falls over.
> any ideas on how to fix this.
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail:
> users-help@tapestry.apache.org
> 
> 

Home page :
  http://uk.geocities.com/matmsh/index.html

Send instant messages to your online friends http://uk.messenger.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org