| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object | +--PTFormUtil
   
Static class containing form utility methods.
 
Usage:	
 	PTFormUtil.fillSelect(select, {'One': 1, 'Two': 2});
 | Field Summary | |
   <static>  <final> Object | 
   VERSION
    | 
   
| Constructor Summary | |
      
	 
	    PTFormUtil 
	 
	 ()
      
      PTFormUtil static object constructor  | 
|
| Method Summary | |
	 
	    <static> Number
	 
       | 
      
	 
	    
	       addItemToSelect(sel,val,txt,idx)
	 
	 Insert new option into select at a given index.  | 
   
	 
	    <static> void
	 
       | 
      
	 
	    
	       clearSelect(sel)
	 
	 Remove all options from a select object.  | 
   
	 
	    <static> void
	 
       | 
      
	 
	    
	       disableAllSelects(elem)
	 
	 Disable all select object within a given document.  | 
   
	 
	    <static> void
	 
       | 
      
	 
	    
	       enableAllSelects(elem,useSelectStateCache)
	 
	 Enable all select object within a given document.  | 
   
	 
	    <static> void
	 
       | 
      
	 
	    
	       fillSelect(sel,optionsInfo)
	 
	 Fill the options in a select menu from an array of text/value data.  | 
   
	 
	    <static> void
	 
       | 
      
	 
	    
	       focusAndSelectText(input)
	 
	 Move keyboard focus to a given text element and select the text within it.  | 
   
	 
	    <static> void
	 
       | 
      
	 
	    
	       focusFormFieldByName(fieldName)
	 
	 Focus a given form field by name.  | 
   
	 
	    <static> String
	 
       | 
      
	 
	    
	       getRadioValue(rads)
	 
	 Get the value of the currently checked radio within a radio group.  | 
   
	 
	    <static> Array
	 
       | 
      
	 
	    
	       hideAllSelects(elem)
	 
	 Hide all select object within a given document.  | 
   
	 
	    <static> void
	 
       | 
      
	 
	    
	       hideSelects(selects)
	 
	 Hides all select elements that are passed in as an array.  | 
   
	 
	    <static> void
	 
       | 
      
	 
	    
	       selectMoveItemDown(sel)
	 
	 Re-order select options by moving currently-selected option down.  | 
   
	 
	    <static> void
	 
       | 
      
	 
	    
	       selectMoveItemUp(sel)
	 
	 Re-order select options by moving currently-selected option up.  | 
   
	 
	    <static> Boolean
	 
       | 
      
	 
	    
	       setRadioValue(rads,val)
	 
	 Set the checked state by value of the radio object within a radio group.  | 
   
	 
	    <static> Boolean
	 
       | 
      
	 
	    
	       setSelectValue(sel,val)
	 
	 Set the selected state by value of an option within a select object.  | 
   
	 
	    <static> Boolean
	 
       | 
      
	 
	    
	       setSelectVisibility(select,vis)
	 
	 Set the visibility of a given select object.  | 
   
	 
	    <static> Array
	 
       | 
      
	 
	    
	       showAllSelects(elem)
	 
	 Show all select object within a given document.  | 
   
	 
	    <static> void
	 
       | 
      
	 
	    
	       showSelects(selects)
	 
	 Shows all select elements that are passed in as an array.  | 
   
| Field Detail | 
<static> <final> Object VERSION
| Constructor Detail | 
PTFormUtil()
| Method Detail | 
<static> Number addItemToSelect(sel,val,txt,idx)
sel -  Select object to fill options (HTML Select)  
      val -  Value of new option (string)  
      txt -  Text label for new option (string)  
      idx -  Index at which to create new option (integer)  
      <static> void clearSelect(sel)
sel -  Select object to fill options (HTML Select)    
      <static> void disableAllSelects(elem)
elem -  Element containing selects to disable (DOM Element)    
      <static> void enableAllSelects(elem,useSelectStateCache)
elem -  Element containing selects to disable (DOM Element)  
      useSelectStateCache -  Whether or not to check against selectStateCache before making select enabled (boolean)    
      <static> void fillSelect(sel,optionsInfo)
sel -  Select object to fill options (HTML Select)  
      optionsInfo -  Array of text/value pairs (Array)    
      <static> void focusAndSelectText(input)
input -  Text input to focus (HTML text Input)    
      <static> void focusFormFieldByName(fieldName)
fieldName -  Name of form field (string)    
      <static> String getRadioValue(rads)
rads -  Array of radio group elements (Array)  
      <static> Array hideAllSelects(elem)
elem -  Element containing selects to hide (DOM Element)  
      <static> void hideSelects(selects)
Returns -  the element that the mouse exited  
      e -  the event objectArray of select elements (DOM Elements)    
      <static> void selectMoveItemDown(sel)
sel -  Select object to fill options (HTML Select)    
      <static> void selectMoveItemUp(sel)
sel -  Select object to fill options (HTML Select)    
      <static> Boolean setRadioValue(rads,val)
rads -  Array of radio group elements (Array)  
      val -  Value of the radio to be set (string)  
      <static> Boolean setSelectValue(sel,val)
sel -  Select object to set (HTML Select)  
      val -  Value of the option to be selected (string)  
      <static> Boolean setSelectVisibility(select,vis)
select -  Select object to show or hide (HTML Select)  
      vis -  Visibility value for select object, 'visible' or 'hidden' (string)  
      <static> Array showAllSelects(elem)
elem -  Element containing selects to show (DOM Element)  
      <static> void showSelects(selects)
selects -  Array of select elements (DOM Elements)    
      
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||