Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Javascript and XML

Reply
Thread Tools

Javascript and XML

 
 
MasterChief
Guest
Posts: n/a
 
      01-16-2006
I have an XML file that stores the addresses of all of our locations.
Then next I have a XSL file that displays the name of each of the
locations in a drop-down box. What is the easiest way to make it so
when the user choses Admin from the name list it goes back, gets the
rest of the information and displays it into textboxes. So when a user
clicks on Admin the text box for city is populated by the information
in the xml file for the Admin City. Some of what I started with is
below.

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="locations.xsl"?>

<Locations>

<store>
<name>Admin</name>
<address>Test</address>
<city>Test</city>
<state>Test</state>
<zip>Test</zip>
<country>United States</country>
</store>

</Locations>

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlnssl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>Locations</h2>
Store Name:
<select name="Locations">
<xsl:for-each select="Locations/store">
<option><xsl:value-of select="name"/></option>
</xsl:for-each>
</select>
<input type="text" name="address" /><br>
..
..
..
</body>
</html>
</xsl:template>
</xsl:stylesheet>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
User uploads XML, page reads XML and adjusts settings all in javascript edfialk Javascript 2 08-03-2007 09:52 PM
Working with XML in JavaScript / Как работать с XML в Javascript'е? noff Javascript 0 06-14-2007 12:46 PM
[Announce] Stylus Studio 2007 XML Enterprise Suite Released: XML Pipeline, XML Publishing and Data Conversion API's stylusstudio@gmail.com Java 0 09-26-2006 05:04 PM
Different results parsing a XML file with XML::Simple (XML::Sax vs. XML::Parser) Erik Wasser Perl Misc 5 03-05-2006 10:09 PM
What XML technologies to learn first for "XML Processing" and "XML Mapping"? Bomb Diggy Java 0 07-28-2004 07:26 AM



Advertisments