You are on page 1of 3

link for profile page

=====================
/servlet/mware.servlets.studentservlet?mwaction=details&file=profile&subsy
sid=12082&include_all_metadata=true
----------------------------------------------------------------------------------
---------------------------------------
form with required values for updating profile:
===============================================
<form name="profilefrm" method="post" onsubmit="return validateprofile();"
action="/servlet/mware.servlets.studentservlet">
<input type="hidden" name="subsysid" value="12082"/>
<input type="hidden" name="mwaction" value="detailsokay"/>
<input type="hidden" name="password" value="**********"/>
<input type="hidden" name="include_all_metadata" value="true"/>
.
.
.
.
.
.
.
</form>
----------------------------------------------------------------------------------
---------------------------------------

field names for profile form


============================
1.login_id
2.email_add
3.first_name
4.middle_name
5.last_name
6.security_question
7.security_answer
8.organization
9.title
10.address1
11.address2
12.city
13.state
14.zip
15.country
16.phone

--------------------------------------

template to pass back all the catagory values to update profile


==============================================================
<xsl:for-each select="//student/categories/category">
<xsl:variable name="catname" select="@name"/>
<xsl:for-each select="choices/choice">
<xsl:variable name="chcname" select="@name"/>
<input type="hidden" name="{$catname}" value="{$chcname}"/>
</xsl:for-each>
</xsl:for-each>
----------------------------------------------------------------------
clint side profile form validation function
===========================================

function validateprofile() {
if(alltrim(document.profilefrm.email_add.value) == "") {
alert("email address must be specified");
document.profilefrm.email_add.value = '';
document.profilefrm.email_add.focus();
return false ;
}
else if(validateemail(document.profilefrm.email_add.value)==false) {
alert("please specify valid email address.");
document.profilefrm.email_add.focus();
return false;
}
else if(document.profilefrm.password.value !=
document.profilefrm.password1.value) {
alert ("password and confirm password address does not match");
document.profilefrm.password1.focus();
return false;
}
else if(alltrim(document.profilefrm.firstname.value) == "") {
alert ("first name must be specified");
document.profilefrm.firstname.value="";
document.profilefrm.firstname.focus();
return false;
}
else if(alltrim(document.profilefrm.lastname.value) == "") {
alert ("last name must be specified");
document.profilefrm.lastname.value="";
document.profilefrm.lastname.focus();
return false;
}
else if(alltrim(document.profilefrm.address1.value) == "") {
alert("address must be specified");
document.profilefrm.address1.focus();
return false;
}
else if(alltrim(document.profilefrm.city.value) == "") {
alert("city must be specified");
document.profilefrm.city.focus();
return false;
}
else if(alltrim(document.profilefrm.state.value)=="") {
alert("state/province must be specified");
document.profilefrm.state.focus();
return false;
}
else if(alltrim(document.profilefrm.zip.value) == "") {
alert("postal code must be specified");
document.profilefrm.zip.focus();
return false;
}
else if(alltrim(document.profilefrm.security_answer.value) == "") {
alert("security answer must be specified");
document.profilefrm.security_answer.focus();
return false;
}
else {
document.profilefrm.submit();
}
}
---------------------------------------------------------------------------

update_details.xsl
------------------
test following conditions in update_details.xsl
-----------------------------------------------
<xsl:if test="login_already_exists">
<br/>
<p> login id already exists. please change login id and try again</p>
</xsl:if>
<xsl:if test="email_already_exists">
<br/>
<p> email address already exists. please change email address and try again</p>
</xsl:if>
<xsl:if test="logmail_already_exists">
<br/>
<p> login id and email id already exists. please change login id,email id and
try again</p>
</xsl:if>

You might also like