Hi, guys. How are you?
Could you listen to me, please.
I have a table in my html document, which is data iland of XML file.
I want to show XML data into that table dependent on user choice.
Like if user click button 1, user see file called 1.xml.
If user click button 2, user see file called 2.xml etc.
Some reason, my code does not work.
Thanks for reading this.
Here is my code:
code:
<html>
<head>
<link rel="stylesheet" type="text/css" href="../css/1.css" id="ss1">
<script type="text/javascript">
function sw(season){
document.all.hiro.href="../xml/" + season + ".xml";
document.all.ss1.href="../css/" + season + ".css";
}
</script>
</head>
<body>
<a href="#">test</a>
<xml src="../xml/1.xml" id="hiro"></xml>
<table border="1" datasrc="#hiro">
<tr>
<td><span datafld="id"></span></td>
<td><span datafld="name"></span></td>
</tr>
</table>
<input type="button" value="1" onClick='sw("1")'>
<input type="button" value="2" onClick='sw("2")'>
<input type="button" value="3" onClick='sw("3")'>
</body>
</html>
Stylesheet has been swaped collectly dependent on user choice. But I cannot swap XML files.....
Help!
Hiroki Kozai