[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Input Fields in XML

Subject: RE: Input Fields in XML
From: Gabriel Paiz III <gpaiz@xxxxxxxxx>
Date: Wed, 2 Dec 1998 10:09:31 -0800
field i .type javascript
Bernd.Loepmeier@xxxxxx writes:

> In the field I type "Bernd" and click the button.
> 
> After klicking on the button I want to get a xml-file:
> 
> <?xml version="1.0"?>
> <Root>
> <Name>Bernd</Name>
> </Root>
> 
> Are there any demo pages in the Web?

How about a DOM version? Here's a script that will generate your XML
file in IE5b2.  Right now, it writes the result to the document,
replacing it in the browser:

<HTML>
<HEAD>
     <TITLE>Input</TITLE>
</HEAD>
<SCRIPT LANGUAGE="JAVASCRIPT">
function Create_onClick()
{
    var doc = new ActiveXObject("Microsoft.XMLDOM");
    var nodProlog = doc.createProcessingInstruction("xml",
"version='1.0'");
    doc.appendChild( nodProlog);
    var nodRoot = doc.createElement("Root");
    doc.appendChild( nodRoot);
    var nodName = doc.createElement("Name");
    nodName.appendChild(doc.createTextNode(txtName.value));
    nodRoot.appendChild(nodName);
    document.write(doc.xml);
}
</SCRIPT>

<BODY>
Name:<input type="text" id="txtName" size="20"/><BR>
<input type="Button" id="cmdCreate" onclick="Create_onClick()"
value="Press here to create XML file"/>
</BODY>
</HTML>

__________________________________
SPX - Valley Forge T.I.S.
25691 Atlantic Ocean Drive Suite B-7
Lake Forest, CA 92630
USA    www.vftis.com
__________________________________

Tel:	(949) 460 0094
Fax:	(949) 460 0095
e-Mail:	gpaiz@xxxxxxxxx
__________________________________


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.