Using Freemarker code inside of JavaScript

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Using Freemarker code inside of JavaScript

SkipDever
Does anyone know if it is possible to use Freemarker ${} syntax inside of a
javascript segment to generate javascript code based on incoming parameters?

Thanks in advance

Skip

Reply | Threaded
Open this post in threaded view
|

Re: Using Freemarker code inside of JavaScript

李明洋
No problem.

2012/5/31 Skip <[hidden email]>

> Does anyone know if it is possible to use Freemarker ${} syntax inside of a
> javascript segment to generate javascript code based on incoming
> parameters?
>
> Thanks in advance
>
> Skip
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Using Freemarker code inside of JavaScript

Deepak Dixit-2
In reply to this post by SkipDever
You can refer javascript.ftl from ordermgr.


Thanks & Regards
--
Deepak Dixit

On May 31, 2012, at 4:44 AM, Skip wrote:

> Does anyone know if it is possible to use Freemarker ${} syntax inside of a
> javascript segment to generate javascript code based on incoming parameters?
>
> Thanks in advance
>
> Skip
>


smime.p7s (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Using Freemarker code inside of JavaScript

SkipDever
Deepak

Thanks a load, an example was just the ticket.

Skip

-----Original Message-----
From: Deepak Dixit [mailto:[hidden email]]
Sent: Wednesday, May 30, 2012 10:16 PM
To: [hidden email]
Subject: Re: Using Freemarker code inside of JavaScript


You can refer javascript.ftl from ordermgr.


Thanks & Regards
--
Deepak Dixit

On May 31, 2012, at 4:44 AM, Skip wrote:

> Does anyone know if it is possible to use Freemarker ${} syntax inside of
a
> javascript segment to generate javascript code based on incoming
parameters?
>
> Thanks in advance
>
> Skip
>


Reply | Threaded
Open this post in threaded view
|

Re: Using Freemarker code inside of JavaScript

Robert Gan
In reply to this post by SkipDever
I dont know, why that should work. Freemarker is a serverside, java script a client side language...

so fremarker syntax is parsed on the server...not on the client...I dont think, that it works

SkipDever wrote
Does anyone know if it is possible to use Freemarker ${} syntax inside of a
javascript segment to generate javascript code based on incoming parameters?

Thanks in advance

Skip
Reply | Threaded
Open this post in threaded view
|

Re: Using Freemarker code inside of JavaScript

Deepak Dixit-2
We can write JS code inside the html code using <script tag.
We can use js code inside freemarker  template.

Thanks & Regards
--
Deepak Dixit
HotWax Media Pvt. Ltd.
www.hotwaxmedia.com
Contact :- +91-98267-54548
Skype  :- deepakdixit

On Jun 5, 2012, at 5:06 PM, Robert G. wrote:

> I dont know, why that should work. Freemarker is a serverside, java script a
> client side language...
>
> so fremarker syntax is parsed on the server...not on the client...I dont
> think, that it works
>
>
> SkipDever wrote
>>
>> Does anyone know if it is possible to use Freemarker ${} syntax inside of
>> a
>> javascript segment to generate javascript code based on incoming
>> parameters?
>>
>> Thanks in advance
>>
>> Skip
>>
>
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Using-Freemarker-code-inside-of-JavaScript-tp4632814p4633244.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.


smime.p7s (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Using Freemarker code inside of JavaScript

Robert Gan
you are right, that way should work...

Deepak Dixit-2 wrote
We can write JS code inside the html code using <script tag.
We can use js code inside freemarker  template.

Thanks & Regards
--
Deepak Dixit
HotWax Media Pvt. Ltd.
www.hotwaxmedia.com
Contact :- +91-98267-54548
Skype  :- deepakdixit

On Jun 5, 2012, at 5:06 PM, Robert G. wrote:

> I dont know, why that should work. Freemarker is a serverside, java script a
> client side language...
>
> so fremarker syntax is parsed on the server...not on the client...I dont
> think, that it works
>
>
> SkipDever wrote
>>
>> Does anyone know if it is possible to use Freemarker ${} syntax inside of
>> a
>> javascript segment to generate javascript code based on incoming
>> parameters?
>>
>> Thanks in advance
>>
>> Skip
>>
>
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Using-Freemarker-code-inside-of-JavaScript-tp4632814p4633244.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

RE: Using Freemarker code inside of JavaScript

SkipDever
In reply to this post by Robert Gan
Robert

This is server side code that generates javascript with Freemarker that is
then sent to the client.

Works a charm by the way

-----Original Message-----
From: Robert G. [mailto:[hidden email]]
Sent: Tuesday, June 05, 2012 4:37 AM
To: [hidden email]
Subject: Re: Using Freemarker code inside of JavaScript


I dont know, why that should work. Freemarker is a serverside, java script a
client side language...

so fremarker syntax is parsed on the server...not on the client...I dont
think, that it works


SkipDever wrote

>
> Does anyone know if it is possible to use Freemarker ${} syntax inside of
> a
> javascript segment to generate javascript code based on incoming
> parameters?
>
> Thanks in advance
>
> Skip
>


--
View this message in context:
http://ofbiz.135035.n4.nabble.com/Using-Freemarker-code-inside-of-JavaScript
-tp4632814p4633244.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: Using Freemarker code inside of JavaScript

guhao
In reply to this post by Robert Gan
because at the last , the page is generate by freemarker , of course you couldn't use javascript  logic