HTML_Javascript
[ class tree: HTML_Javascript ] [ index: HTML_Javascript ] [ all elements ]

Source for file js.php

Documentation is available at js.php

  1. <html>
  2. <body>
  3. <?php
  4. //ini_set('include_path','.:/data/peartest/share/pear');
  5. //ini_set('include_path','.:/data/pear/cvsroot/pear:/data/pear/cvsroot/php4/pear');
  6. require_once 'HTML/Javascript.php';
  7. require_once 'HTML/Javascript/Convert.php';
  8. // ,array(741,742,743)
  9. $test   = array(
  10.             "foo1"=>"this \\ is a string test &\" and 'nothing' must failed",
  11.             "foo2"=>2,
  12.             "foo3"=>3,
  13.             "foo4"=>4,
  14.             "foo5"=>5,
  15.             "foo6"=>6,
  16.             "foo7"=>array(
  17.                         71,
  18.                         72,
  19.                         73,
  20.                         "foo74"=>array(
  21.                                         741,
  22.                                         742,
  23.                                         743
  24.                                         )
  25.                     )
  26.         );
  27.  
  28. $js = new HTML_Javascript();
  29. echo $js->startScript();
  30.  
  31. echo HTML_Javascript_Convert::convertArray$test'arTest'true );
  32. echo HTML_Javascript::alert('toto');
  33. echo HTML_Javascript::prompt('toto','toto');
  34. echo $js->confirm('sure''Are you sure?!');
  35. echo $js->popup('win''./test.html''window'200200false);
  36. echo $js->popupWrite('win2''Foo? Bar!''window2222222222222222222222'200200true);
  37. echo $js->endScript();
  38. ?>
  39. <script>
  40.  
  41.  
  42. function interrogate(what) {
  43.     var output = '';
  44.     for (var i in what){
  45.         output += i+ " ";
  46.     }
  47.     alert(output);
  48. }
  49.  
  50. </script>
  51. </body>
  52. </html>

Documentation generated on Mon, 11 Mar 2019 15:34:45 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.