Class: JavascriptHelper

Source Location: /CORE/system/classes/util/html/JavascriptHelper.php

Class JavascriptHelper

Class Overview

This class defines methods some helper methods for Javascript handling.

Located in /CORE/system/classes/util/html/JavascriptHelper.php [line 36]



		
				Author(s):
		
  • Kevin Papst
Information Tags:
Version:  $Id: JavascriptHelper.php,v 1.4 2008/08/14 22:16:44 kpapst Exp $
Copyright:  Copyright (C) Kevin Papst
License:  GNU Public License

Methods

[ Top ]
Method Summary
static void   createJSPopup()   Generates the complete (see following example) HTML code to insertr into your Page

[ Top ]
Methods
static method createJSPopup  [line 64]

  static 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]  )

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);

Parameters:
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


[ Top ]