7-Nov-03 (Created: 7-Nov-03) | More in 'Property file examples: AKC'

akc-create-user.html

akc/create-user.html


((html))

((head))
((title))AKC: Create/Change note((/title))
((link rel="stylesheet" type="text/css" href="/akc/style/style.css"))
((script src="/akc/js/genericedits1.js"))((/script))

((script))

/*
*********************************************************************
* createUser
*********************************************************************
*/
function createUser()
{
	alert("Creating a user");
	if (validateRequired(mainform,"userIdTextBox,passwordTextBox,rPasswordTextBox,firstNameTextBox,lastNameTextBox,emailTextBox") == false)
	{
		return;
	}
	
	if (mainform.passwordTextBox.value != mainform.rPasswordTextBox.value)
	{
		alert("Both password fields should have the same value");
		return;
	}
	fieldValues = getAllFieldValues(mainform);
	mainform.fieldValues.value = fieldValues;
	mainform.action="/akc/servlet/UpdateServlet";
	mainform.submit();
}
function onLoadFunction()
{
	fieldValues = "{{fieldValues}}";
	if (fieldValues != "")
	{
		setFieldValues(mainform,fieldValues);
	}
}
((/script))
((/head))


((body onLoad="onLoadFunction()"))

((h2))Create A New User((/h2))
((hr))
((!--RLF_TAG BGN_IF result=error if1 --))
((p class="error"))Duplicate userid. Please chose a different userid((/p))
((!--RLF_TAG END_IF result=error if1 --))
((form name="mainform" onLoad="onLoadFunction()"))
((input type="hidden" name="request_name" value="CreateUser"/))
((input type="hidden" name="fieldValues" value=""/))
((p))
  Userid    
  ((input type="text" name="userIdTextBox" size="20" value="{{userIdTextBox}}"))((/p))
((p))
  Password    
  ((input type="text" name="passwordTextBox" size="20" value="{{passwordTextBox}}"))((/p))
((p))
  Reenter Password    
  ((input type="text" name="rPasswordTextBox" size="20" value="{{rPasswordTextBox}}"))((/p))
((p))
  First Name   
  ((input type="text" name="firstNameTextBox" size="20" value="{{firstNameTextBox}}"))((/p))
((p))
  Last Name    
  ((input type="text" name="lastNameTextBox" size="20" value="{{lastNameTextBox}}"))((/p))
((p))
  Email   
  ((input type="text" name="emailTextBox" size="20" value="{{emailTextBox}}"))((/p))
((p))
     
  ((input type="button" value="Create" onClick="createUser()" name="B1"))    ((/p))
((/form))



((/body))

((/html))