You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Antony Adopo <sa...@gmail.com> on 2013/10/20 01:35:53 UTC
ofbiz code in java script
Hello, Ofbizers.
please, could we use Ofbiz list in javascript code.
I need this for a personnal paging script.
exemple "productCategoryMembers" list
Please give me an example on how implement it.
thanks
Re: ofbiz code in java script
Posted by Paul Piper <pp...@ilscipio.com>.
Hi,
unfortunately, Javascript is client-side whereas the variables you mention
are processed serverside. If you want to put anything in the context of
javascript (so that you can use it in a function or such), you will have to
add it in the templates as such:
this is of course pseudo code, but by rendering it out during page load, the
variable you define in the body of the html, will be available for the
javascript you define. Whenever you do, however, make sure to wrap your
javascript in a
$(document ).ready(function() {
// my code
});
function. That way your static javascript file will be processed after the
page has been succesfully loaded...
--
View this message in context: http://ofbiz.135035.n4.nabble.com/ofbiz-code-in-java-script-tp4645052p4645054.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: ofbiz code in java script
Posted by Antony Adopo <sa...@gmail.com>.
and also code like ${productsummaryScreen} in javascript code?
2013/10/20 Antony Adopo <sa...@gmail.com>
> Hello, Ofbizers.
>
> please, could we use Ofbiz list in javascript code.
> I need this for a personnal paging script.
>
> exemple "productCategoryMembers" list
>
> Please give me an example on how implement it.
>
> thanks
>
>