...

View Full Version : data island + browser help



capt_nemo777
11-07-2008, 10:39 AM
why is my data island code not working with firefox? except for IE7 :(

here's the screenshot

http://www.freeimagehosting.net/uploads/d9a30918a4.png

and here's my code



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>Hello!</title>
</head>

<body>
<xml id="myxmldatasource">
<items>
<item id="item1">
<name>Mocah</name>
<type>Coffee</type>
<photo>photos/candles.jpg</photo>
</item>
<item id="item2">
<name>Decaf</name>
<type>Coffee</type>
<photo>photos/teacup.jpg</photo>
</item>
<item id="item3">
<name>Raspbery Zinger</name>
<type>Tea</type>
<photo>photos/teapot_white.jpg</photo>
</item>
<item id="item4">
<name>Earl Grey</name>
<type>Tea</type>
<photo>photos/teapot_bone.jpg</photo>
</item>
</items>
</xml>
<table datasrc="#myxmldatasource" border="1">
<thead>
<tr>
<th>Photo</th>
<th>Description</th>
<th>Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<img datafld="photo"/>
</td>
<td>
<span datafld="name"/>
</td>
<td>
<span datafld="type"/>
</td>
</tr>
</tbody>
</table>

</body>

</html>

oesxyl
11-07-2008, 12:18 PM
why is my data island code not working with firefox? except for IE7 :(

because is not a valid page.

regards

carlitos_way
11-07-2008, 12:19 PM
Hi capt_nemo777,

I'm sorry but XML Data Islands only works with Internet Explorer browsers!!!

check w3schools (http://www.w3schools.com/Xml/xml_dont.asp) for more info about it.

To do the work you want to do, you should use JavaScript and XML DOM, or CSS.
(from the link I gave you you can explore more the way to do it)

ciao

capt_nemo777
11-07-2008, 01:31 PM
oh ok.. i'll get into javascript next week :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum