Development

HowtoInitializeJavascriptWithJson (diff)

You must first sign up to be able to contribute.

Changes between Version 3 and Version 4 of HowtoInitializeJavascriptWithJson

Show
Ignore:
Author:
tumf (IP: 210.136.2.134)
Timestamp:
12/15/06 08:38:11 (11 years ago)
Comment:

fix

Legend:

Unmodified
Added
Removed
Modified
  • HowtoInitializeJavascriptWithJson

    v3 v4  
    22When you write Javascript in template,are not the following codes written? 
    33{{{ 
    4 <javascript
     4<script type="text/javascript"
    55var mypet_type = "<?php echo $sf_data["cat"] ?>" 
    6 </javascript> 
     6</script> 
    77}}} 
    88Javascript mixes with PHP is not understood easily.  
    2121{{{ 
    2222<?php use_helper('Json') ?> 
    23 <php echo export_js("fruits",$fruits) ?> 
     23<?php echo export_js("fruits",$fruits) ?> 
    2424}}} 
    2525