srividya_sharma

Placing a Smarty Variable into the SetDataXML parameter...

Recommended Posts

I have a number of website applications which I want to populate dynamically with a Smarty Variable, but it's always a hit or miss proposition whether it will work or not. The following line of code works in one website, but not in a copy of the exact same page on a different website. Note the {$USER_AVG_V_SCORE} smarty variable.

 

 

 

What am I missing? All suggestions are appreciated. Thanks

 

 

 

OK - so I can't get the code to show up correctly below...I have attached a text file with the source code/script - still looking for suggestions

 

 

 

 

 

[p]myBulletChart.setDataXML("{$USER_AVG_V_SCORE}98");[/p]

bulletchart.txt

Edited by Guest

Share this post


Link to post
Share on other sites

ok, from your other posts, it appears that you are using PHP.

Since you are getting inconsistent behaviour when using Smarty variables, here is a suggestion.

You store the entire XML in a variable ( Javascript variable if client side, PHP variable if server side) and then provide the

XML from the variable to the setDataXML method.

Hope this solves your problem. :)

Srividya

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now