S
sniper
hi ;
i have this small code that consist in taking the name of the user and
writing it in the same form as an output.the name is relative to
/data/valid/string1
In my Js code i want to access the value of /data/valid/string1 (The
name seised by the user)
and alert the name as result
Can you help me to achieve this?
<?xml version="1.0" encoding="UTF-8"?>
<xhtml:html xmlns="http://xforms.websynapsis.com"
xmlns:books="http://books.websynapsis.com"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xhtml:head>
<xhtml:title>
Test case for primitive XML Schema types
</xhtml:title>
<xhtml:link rel="stylesheet" href="style.css" type="text/css"/>
<xforms:model>
<xforms:instance xmlns="">
<data>
<valid>
<string1
id="f1">Name</string1>
</valid>
</data>
</xforms:instance>
<xforms:bind nodeset="/data/valid/string1"
type="xsd:string" />
</xforms:model>
<xhtml:script id="gtre" type="text/javascript">
function initiate()
{
var p=document.getElementById('label11').firstChild.nodeValue
alert(""+p)
}
</xhtml:script>
</xhtml:head>
<xhtml:body>
<xforms:group/>
<xforms:input ref="/data/valid/string1">
<xforms:label lang="en">Name
:</xforms:label>
<xforms:action ev:event="xforms-valid">
</xforms:action>
</xforms:input>
<xhtml:input type="button" value="Afficher"
onclick="initiate();" />
<xforms:group/>
<xformsutput ref="/data/valid/string1" id="label1">
<xforms:label id="label11">Name : </xforms:label>
</xformsutput>
<xforms:group>
</xforms:group>
</xhtml:body>
</xhtml:html>
thanks for any help
i have this small code that consist in taking the name of the user and
writing it in the same form as an output.the name is relative to
/data/valid/string1
In my Js code i want to access the value of /data/valid/string1 (The
name seised by the user)
and alert the name as result
Can you help me to achieve this?
<?xml version="1.0" encoding="UTF-8"?>
<xhtml:html xmlns="http://xforms.websynapsis.com"
xmlns:books="http://books.websynapsis.com"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xhtml:head>
<xhtml:title>
Test case for primitive XML Schema types
</xhtml:title>
<xhtml:link rel="stylesheet" href="style.css" type="text/css"/>
<xforms:model>
<xforms:instance xmlns="">
<data>
<valid>
<string1
id="f1">Name</string1>
</valid>
</data>
</xforms:instance>
<xforms:bind nodeset="/data/valid/string1"
type="xsd:string" />
</xforms:model>
<xhtml:script id="gtre" type="text/javascript">
function initiate()
{
var p=document.getElementById('label11').firstChild.nodeValue
alert(""+p)
}
</xhtml:script>
</xhtml:head>
<xhtml:body>
<xforms:group/>
<xforms:input ref="/data/valid/string1">
<xforms:label lang="en">Name
:</xforms:label>
<xforms:action ev:event="xforms-valid">
</xforms:action>
</xforms:input>
<xhtml:input type="button" value="Afficher"
onclick="initiate();" />
<xforms:group/>
<xformsutput ref="/data/valid/string1" id="label1">
<xforms:label id="label11">Name : </xforms:label>
</xformsutput>
<xforms:group>
</xforms:group>
</xhtml:body>
</xhtml:html>
thanks for any help