home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 June / ENTER.ISO / files / xampp-win32-1.4.5-installer.exe / xampp / js.php < prev    next >
Encoding:
PHP Script  |  2004-03-24  |  1.4 KB  |  53 lines

  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', 200, 200, false);
  36. echo $js->popupWrite('win2', 'Foo? Bar!', 'window2222222222222222222222', 200, 200, true);
  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>
  53.