You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Angelo Chen <an...@yahoo.com.hk> on 2007/10/28 04:20:08 UTC

T5: property value in external javascript file

Hi,

How to get properties value in an external javascript file? example: I have
this:

 var link = "$(theLink)"; 

it does not expand, i tried to put prob: before that, same, any ideas?
Thanks,

A.C.
-- 
View this message in context: http://www.nabble.com/T5%3A-property-value-in-external-javascript-file-tf4705347.html#a13449723
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: T5: property value in external javascript file

Posted by Angelo Chen <an...@yahoo.com.hk>.
Hi Josh,

external js file is not rendered by T5, so seems no way to do that there,
what I'm doing now is, include a function in the template callable from a
external js file:

 <script type="text/javascript">
     function myStatesLink() {return "${theLink}";}
 </script>


Josh Canfield-2 wrote:
> 
> You don't. You probably don't want to either right? Don't you want your
> external javascript to get cached in the clients browser?
> 
> What about setting your parameters in the page that includes the
> javascript?
> 
> Josh
> 
> On 10/27/07, Angelo Chen <an...@yahoo.com.hk> wrote:
>>
>>
>> Hi,
>>
>> How to get properties value in an external javascript file? example: I
>> have
>> this:
>>
>> var link = "$(theLink)";
>>
>> it does not expand, i tried to put prob: before that, same, any ideas?
>> Thanks,
>>
>> A.C.
>> --
>> View this message in context:
>> http://www.nabble.com/T5%3A-property-value-in-external-javascript-file-tf4705347.html#a13449723
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 
> 
> -- 
> --
> TheDailyTube.com. Sign up and get the best new videos on the internet
> delivered fresh to your inbox.
> 
> 

-- 
View this message in context: http://www.nabble.com/T5%3A-property-value-in-external-javascript-file-tf4705347.html#a13461474
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: T5: property value in external javascript file

Posted by Josh Canfield <jo...@thedailytube.com>.
You don't. You probably don't want to either right? Don't you want your
external javascript to get cached in the clients browser?

What about setting your parameters in the page that includes the javascript?

Josh

On 10/27/07, Angelo Chen <an...@yahoo.com.hk> wrote:
>
>
> Hi,
>
> How to get properties value in an external javascript file? example: I
> have
> this:
>
> var link = "$(theLink)";
>
> it does not expand, i tried to put prob: before that, same, any ideas?
> Thanks,
>
> A.C.
> --
> View this message in context:
> http://www.nabble.com/T5%3A-property-value-in-external-javascript-file-tf4705347.html#a13449723
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

Re: T5: property value in external javascript file

Posted by Bill Holloway <bi...@gmail.com>.
One possible issue is that you've used parentheses in the expression.
Curly braces are the syntax.  Try "${theLink}".

Bill H.

On 10/27/07, Angelo Chen <an...@yahoo.com.hk> wrote:
>
> Hi,
>
> How to get properties value in an external javascript file? example: I have
> this:
>
>  var link = "$(theLink)";
>
> it does not expand, i tried to put prob: before that, same, any ideas?
> Thanks,
>
> A.C.
> --
> View this message in context: http://www.nabble.com/T5%3A-property-value-in-external-javascript-file-tf4705347.html#a13449723
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

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