Re: generating js arrays with Flexy
| From: | Demian Turner | Date: | Tue, 06 Apr 2004 09:00:24 +0000 |
| Subject: | Re: generating js arrays with Flexy | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-11642@lists.php.net to get a copy of this message | ||
Using Flexy 0.6.3 and the latest release, 0.7, I get the error
Undefined class name 'html_javascript' in c:\htdocs\seagull\lib\pear\HTML\Javascript\Convert.php on line 174
At this point in the code there is an attempt to raise an error, "Invalid variable".
cheers
demian
Alan Knowles wrote:
what php gets generated when you do $this->stories = array(11 => 'Fonoregistrazione', 12 => 'Riversamento', 13 => 'Stenotipia'); ..... <flexy:toJavascript flexy:prefix="aTitles" A="stories"> </flexy:toJavascript> Regards Alan Demian Turner wrote:Hi Alan I'm trying to dynamically build a js array with Flexy, it should end up looking like this: <script type="text/javascript"> aTitles_A = { "11":"Fonoregistrazione", "12":"Riversamento", "13":"Stenotipia", } </script> generated from a PHP hash $aStories = array(11 => 'Fonoregistrazione', 12 => 'Riversamento', 13 => 'Stenotipia');any suggestions? tia demian