Topic: XML switcher (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=11027" title="Pages that link to Topic: XML switcher (Page 1 of 1)" rel="nofollow" >Topic: XML switcher <span class="small">(Page 1 of 1)</span>\

 
Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 08-20-2003 02:29

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

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 08-21-2003 00:04

Thanks, I figured out!

Hiroki Kozai

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 08-21-2003 00:14

I'm glad that we could help...


Bmud
Bipolar (III) Inmate

From: Raleigh, NC
Insane since: Mar 2001

posted posted 08-22-2003 19:36

Mr MAX, you're getting so good you don't have to even answer questions anymore. lol. congrats on the success Hiroki! Hey.. i remembered your name. coooool.

Shine and shine. :: [Cell=992] :: [See my team's 30 second animation]



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu