This discussion is archived
3 Replies Latest reply: Oct 6, 2008 6:10 AM by 800432 RSS

Fetch data into "form" from database. The form is build through XML forms

843844 Newbie
Currently Being Moderated

{color:#ff00ff}Hi All,{color}



{color:#ff00ff}I have been working in J2SE/J2EE but one of our requirements need more knowledge on XML and javascript / AJAX code.
{color}
{color:#ff00ff}My requirement is, from the "Existing User Information form" if the user enters an SSO ID(user id) then automatically his lastname & firstname must be populated at respective fields {color}{color:#ff00ff}but this form is designed through "xml forms" whose code is placed below.{color}



<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="[http://172.16.171.161:8080/wl/stylesheets/form2html.xsl]"?>


<document>
<xf:form id="idUserInformation"
description=""
xmlns:xf="[http://www.xmlform.org/2003]">
<xf:label>Existing User Information</xf:label>
<xf:submit id="submit"
action="submit">
<xf:label>Submit</xf:label>
</xf:submit>
<xf:group id="idUserInfo">
<xf:label>Existing Associates Information (Information about the user who needs the service)</xf:label>
<xf:input id="idSSOID"
required="true">
<xf:value></xf:value>
<xf:label>SSO ID</xf:label>
<xf:hint>Ex: SSO ID = OHR ID</xf:hint>
</xf:input>

<xf:input id="idFName"
required="true">
<xf:value></xf:value>
<xf:label>First Name</xf:label>
</xf:input>
<xf:input id="idLName"
required="true">
<xf:value></xf:value>
<xf:label>Last Name</xf:label>
</xf:input>
</xf:group>
</xf:form>
</document>




{color:#ff00ff}Now I need to write a javascript / AJAX code that has to pick the current value from the SSO ID field and fetch the information from the database.

NOTE : If any body wants to view the form or my request is not clear please mail me to [ranjeethv@gmail.com|mailto:ranjeethv@gmail.com]
{color}


{color:#ff00ff}Thanks,
Ranjeeth.{color}