Login   Register  
PHP Classes
elePHPant
Icontem

File: trgrs_People.js

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Michael J. Fuhrman  >  People  >  trgrs_People.js  >  Download  
File: trgrs_People.js
Role: Auxiliary data
Content type: text/plain
Description: JavaScript functions that determine what should be done when a link is selected
Class: People
Manage user contacts
Author: By
Last change:
Date: 2010-07-09 17:08
Size: 1,859 bytes
 

Contents

Class file image Download
/*	=======================================
	Copyright 1998 - 2010 - E Net Arch
	This program is distributed under the terms of the GNU 
	General Public License (or the Lesser GPL).
	======================================= */

var ENetArch = 
{
	People :
	{
		nFolderID : 0, 
		nPos : 0, 
		onCheckID : function (me) { this.nPos = me.value; },
		List : function () { location="List.php?nFolderID=" + this.nFolderID + "&"; } ,
		New : function () { location="New.php?nFolderID=" + this.nFolderID + "&"; } ,
		View : function () { location="View.php?nFolderID=" + this.nFolderID + "&nPos=" + this.nPos + "&"; } ,
		Edit : function () { location="Edit.php?nFolderID=" + this.nFolderID + "&nPos=" + this.nPos + "&"; } ,
		Delete : function () 
		{ 
			me = $("ENetArch_People_Form");
			
			me.action="Delete.php?nFolderID=" + this.nFolderID + "&"; 
			me.method="post";
			me.submit();
		} ,
		AddNew : function (me) 
		{ 
			me.action="add.php?nFolderID=" + this.nFolderID + "&"; 
			me.method="post";
			me.submit(); 
		} , 
		Update : function (me) 
		{ 
			me.action="update.php?nFolderID=" + this.nFolderID + "&nPos=" + this.nPos + "&"; 
			me.method="post";
			me.submit();
		} , 
		gotoPage : function (n)
		{
			$("ENetArch_People_nPage").value = n;

			me = $("ENetArch_People_Form");
			
			me.action="list.php?nFolderID=" + this.nFolderID + "&"; 
			me.method="post";
			me.submit();
		},
		pageSize : function ()
		{
			me = $("ENetArch_People_Form");
			
			me.action="list.php?nFolderID=" + this.nFolderID + "&"; 
			me.method="post";
			me.submit();
		},
	},	
}

/*	=======================================

Note:	if your form won't submit when me.submit is called, 
	you must add a submit button to your form.  It's an HTML
	quirk =(...
	
	======================================= */