开发者

can i store a value returned by apex method in a javascript variable?

开发者 https://www.devze.com 2023-02-03 21:42 出处:网络
Is it possible to store a value returned by a controller method into a javascript variable? i need to pass a date and sales qty from salesforce into flot library javascript to build a graph. So what

Is it possible to store a value returned by a controller method into a javascript variable?

i need to pass a date and sales qty from salesforce into flot library javascript to build a graph. So what i am doing is formatting a string in apex with the da开发者_如何转开发te and salesqty as required by flot library and returning it in the method.

Can i say in my javascript

var d={!getformatteddata};

Thanks

Prady


You can do this, just omit the leading 'get':

var d='{!formatteddata}';
0

精彩评论

暂无评论...
验证码 换一张
取 消