Class JavascriptHelper

Description

This class defines methods some helper methods for Javascript handling.

  • version: $Id: JavascriptHelper.php,v 1.3 2006/11/26 22:04:30 kpapst Exp $
  • copyright: Copyright (C) 2002-2006 Kevin Papst
  • author: Kevin Papst
  • license: GNU Public License


			
Method Summary
void createJSPopup (String $func_name, String $title, int $width, int $height, String $link, [array $modifier = array()], [String $scrollbar = 'no'], [String $resizable = 'no'], [boolean $appendModifier = true])
Methods
createJSPopup (line 63)

Generates the complete (see following example) HTML code to insertr into your Page

to have a Javascript function to open a PopUp:

  1.  <script type="text/javascript">
  2.   function func_name({
  3.       ... more generated code ...
  4.   }
  5.  </script>

Use like this:

  1.  echo JavascriptHelper::createJSPopup('openYourFoo''FooTitle''(screen.width)''(screen.height)''http://www.example.com',array(),'no','yes',false);

void createJSPopup (String $func_name, String $title, int $width, int $height, String $link, [array $modifier = array()], [String $scrollbar = 'no'], [String $resizable = 'no'], [boolean $appendModifier = true])
  • String $func_name: func_name the Javascript function name
  • String $title: title the title of the Popup
  • int $width: width the width of the Popup
  • int $height: height the height of the Popup
  • String $link: link the URL to open in the Popup
  • array $modifier: modifier an array of String that will be used as Parameter in the function method
  • String $scrollbar: scrollbar the HTML value to display an Scrollbar or not (yes/no)
  • String $resizable: resizable the HTML value to decide whether the Popup is resizable or not (yes/no)
  • boolean $appendModifier: appendModifier decide if the Modifiers will be appended to the Link URL or not

Documentation generated by phpDocumentor 1.3.1