Re: generating js arrays with Flexy

From: Date: Tue, 06 Apr 2004 09:07:05 +0000
Subject: Re: generating js arrays with Flexy
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-11643@lists.php.net to get a copy of this message
Yeah - I've filed a bug on html_javascript for this one... - I guess it may be worth looking at if html_javascript_convert can do arrays (and how it does them..) Regards Alan Demian Turner wrote:
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
-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com

« previous php.pear.general (#11643) next »