logo-dw

Go Back   Dreamweaver Club Forums > Dreamweaver forums > Spry
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 10-07-2011, 07:55 AM   #1
asha
 
Join Date: Oct 2011
Posts: 1
Smile Failed to retrieve dataset for spry:repeat

<!
DOCTYPEhtmlPUBLIC"-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<
html>
<
head>
<
metahttp-equiv="Content-Type"content="text/html; charset=ISO-8859-1">
<
title>Insert title here</title>

<
scripttype="text/javascript"src="spry/xpath.js"></script>
<
scripttype="text/javascript"src="spry/SpryData.js"></script>
<
scripttype="text/javascript"src="spry/SpryEffects.js"></script>

<!--Create a data set object-->
<
scripttype="text/javascript">

var
dsSpecials = new Spry.Data.XMLDataSet("spry/cafe.xml", "specials/menu_item");
obj1=
new Object();
obj1.onPostLoad=
function(dataSet,data)
{

var
dd=dsSpecials.getData();
document.write(
"Hello");
alert(
"Data Loaded");

for
(i=0;i<dd.length;i++)
{

document.write(
"Item="+dd[i].item);
}

 
 
}
dsSpecials.addObserver(obj1);

 

</
script>
</
head>
<
body>

<!--Create the Spry dynamic region-->
<
divid="Specials_DIV"spry:region="dsSpecials">

<!--Display the data in a table-->
<
tableid="Specials_Table"border="2">
<
tr>
<
th>Item</th>
<
th>Description</th>
<
th>Price</th>
</
tr>
<
trspry:repeat="dsSpecials">
<
td>{item}</td>
<
td>{description}</td>
<
td>{price}</td>
</
tr>
</
table>

 
 
</
div>


 
</
body>
</
html>



*************************************************
M getting error like failed to retrieve dataset??
Could u plz help me out>>>What does it mean

asha is offline   Reply With Quote
Old 10-28-2011, 03:55 PM   #2
dbepp
dbepp's Avatar
 
Join Date: Jun 2011
Location: Indiana
Posts: 93
Default

Quote:
Originally Posted by asha View Post

<!--Create a data set object-->
<
scripttype="text/javascript">

var
dsSpecials = new Spry.Data.XMLDataSet("spry/cafe.xml", "specials/menu_item");
obj1=
new Object();
obj1.onPostLoad=
function(dataSet,data)
{


M getting error like failed to retrieve dataset??
Could u plz help me out>>>What does it mean

I'm kinda lost in regards to the rest of the code.. but I'd initially check your extentions.. "spry/cafe.xml" and "specials/menu_item"... are they there? Is that the right path? Just a thought
dbepp is offline   Reply With Quote
Reply


Thread Tools
Display Modes

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

Forum Jump


All times are GMT. The time now is 09:22 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com