Dissapearing Spry regions
I have two Spry:regions coming from two different datasets
(vars I loaded in the head), NOT nested (they are independant,
self-contained, spry:regions (divs)). When I render, only the first
dataset is showing. However if I repeat the one dataset showing, it
shows twice. How do I get the second spry:region to appear and stay
onscreen? It appears briefly on the screen as the page loads, but
this entire spry:region of the different dataset, dissapears
completely, after retrieval of the XML, with no javascript errors.
This is happenign in both Netscape8.1 and IE7.
part of The CSS for center divs:
/* center column divs
===================================================*/
#centerColumn {
margin:0px;
padding:0px;
display:block;
position:absolute;
width:497px;
left:219px;
top:150px;
height:100%;
#welcomeStoryArea {
margin:0px;
padding:0px;
display:block;
position:relative;
float:left;
width:497px;
height:136px;
background-image:url(../images/RM_welcome_bkgrd.jpg);
background-repeat:no-repeat;
#wakeUpCall {
display:block;
float:left;
clear:left;
margin:10px 0 0 0;
padding:0px;
position:relative;
left:0px;
width:491px;
#DundeeCoverageUniverse {
display:block;
float:left;
clear:left;
margin:10px 0 0 0;
padding:0px;
position:relative;
left:0px;
width:491px;
#dsRecentDundee {
display:block;
float:left;
clear:left;
margin:10px 0 0 0;
padding:0px;
position:relative;
left:0px;
width:491px;
visibility:visible;
/* Welcome Story area styles
===================================================*/
The Head part of HTML for laoding the variables:
<head>
<title>Dundee Research</title>
<link rel=stylesheet type="text/css"
href="../css/research.css" />
<script type="text/javascript"
src="../js/xpath.js"></script>
<script type="text/javascript"
src="../js/SpryData.js"></script>
<script type="text/javascript"
src="../js/research.js"></script>
<script language="javascript" type="text/javascript"
src="/js/dwm_functions.js"></script>
<script language="javascript" type="text/javascript"
src="/js/dwm_toggle.js"></script>
<!-- This is the loading of the datasets from the XMLs,
'useCache' either forces return to server for XML data, or just to
cache-->
<script type="text/javascript">
var wakeUpCall = new
Spry.Data.XMLDataSet("../data/wakeUp.xml",
"wakeUp/report",{useCache:false});
var dsRecentDundee = new
Spry.Data.XMLDataSet("../data/RecentDundeeResearch.xml",
"recent/dundee", {useCache:true});
var dsDundeeUniverse = new
Spry.Data.XMLDataSet("../data/DocumentServlet.xml",
"DundeeUniverse/Record");
</script>
</head>
The DIv that is causing the problem:
<!-- start center column enclosing all tables -->
<div id="centerColumn">
<!-- start Welcome and story area -->
<div id="welcomeStoryArea">
<h3>Welcome to Dundee Research</h3>
<P>jdlfgkjd ldfkjg ldfkjg ldfkgj ldfkgj ldfkgj ldfkjg
ldfkjgld kfjgld kjdlfgkjd lfkgjdlfk gjdlfkgjd lkjgldfkgjdl
fkjg</P>
</div>
<!-- stop Welcome and story area -->
<!-- Start Wake-up Call -->
<!-- this tells the HTML this is a dynamic Spry region,
loaded with the array from the dataset you loaded in the head
-->
<div spry:region="wakeUpCall" id="wakeUpCall">
<p class="tbl_title">Wake-up Call</p>
<table border="0" cellpadding="5" cellspacing="2"
width="491">
<tr>
<th class="tbl_header" scope="col"
onclick="wakeUpCall.sort('date'); " width="97">Date
Published</th>
<th class="tbl_header" scope="col"
onclick="wakeUpCall.sort('title'); "
width="379">Title</th>
</tr>
<tr spry:repeat="wakeUpCall">
<td class="tbl_cell">{wakeUpCall::date}</td>
<td class="tbl_cell"><a
href="#">{wakeUpCall::title}</a></td>
</tr>
</table>
<p class="more"><a
href="#">more</a></p>
</div>
<!-- stop Wake-up Call -->
<!-- start Dundee Coverage Universe -->
<div id="DundeeCoverageUniverse">
<p class="tbl_title">Dundee Coverage Universe</p>
<table border="0" cellpadding="5" cellspacing="2"
width="491">
<tr>
<th class="tbl_header_noSort" width="97">Date
Published</th>
<th class="tbl_header_noSort"
width="379">Title</th>
</tr>
<tr>
<td class="tbl_cell">23-20-2007</td>
<td class="tbl_cell"><a href="#">Esitimates and
Recommendations 23-Feb-07</a></td>
</tr>
</table>
</div>
<!-- stop Dundee Coverage Universe -->
<!-- Start Recent Dundee Research -->
<!-- this tells the HTML this is a dynamic Spry region,
loaded with the array from the dataset you loaded in the head
-->
<div spry:region="dsRecentDundee" id="dsRecentDundee">
<p class="tbl_title">Recent Dundee Research</p>
<table border="0" cellpadding="5" cellspacing="2"
width="491">
<tr>
<th class="tbl_header" scope="col"
onclick="dsRecentDundee.sort('date'); " width="97">Date
Published</th>
<th class="tbl_header" scope="col"
onclick="dsRecentDundee.sort('title'); "
width="379">Title</th>
</tr>
<tr spry:repeat="dsRecentDundee">
<td class="tbl_cell">{dsRecentDundee::date}</td>
<td class="tbl_cell"><a
href="#">{dsRecentDundee::title}</a></td>
</tr>
</table>
<p class="more"><a
href="#">more</a></p>
</div>
<!-- stop Recent Dundee Research -->
</div>
<!-- stop center column enclosing all tables -->
Text
Text
The sample XML file of RecentResearch:
<?xml version="1.0" encoding="iso-8859-1"?>
<recent>
<dundee id="1">
<date>28-02-2007</date>
<title>Focus on the Juniors - 2007: Dundee's Mineral
Exploration Stock Watch</title>
</dundee>
<dundee id="2">
<date>23-02-2007</date>
<title>Canadian Banks - No Need to Fear the
Future</title>
</dundee>
<dundee id="3">
<date>19-02-2007</date>
<title>Aeroplan Income Fund - Set to
Soar</title>
</dundee>
<dundee id="4">
<date>13-02-2007</date>
<title>Mirabela Nickel Limited - Succeeding at Santa
Rita</title>
</dundee>
<dundee id="5">
<date>07-02-2007</date>
<title>Breaker Energy Ltd. - Stable & Consistent
Growth in a Wave of Uncertainty</title>
</dundee>
</recent>
The sample XML file that is working:
<?xml version="1.0" encoding="iso-8859-1"?>
<wakeUp>
<report id="1">
<date>08-03-2007</date>
<title>CCL, Current Market Statisitics, Daily Summary,
Estimate Tables</title>
</report>
<report id="2">
<date>08-03-2007</date>
<title>CCL, Current Market Statisitics, Daily Summary,
Estimate Tables</title>
</report>
<report id="3">
<date>07-03-2007</date>
<title>SW, Current Market Statisitics, Daily Summary,
Estimate Tables</title>
</report>
<report id="4">
<date>06-03-2007</date>
<title>ACG, TET.UN, Current Market Statisitics, Daily
Summary, Estimate Tables</title>
</report>
<report id="5">
<date>05-03-2007</date>
<title>Current Market Statisitics, Coming Events,
Daily Summary, Estimate Tables</title>
</report>
</wakeUp>
Text
Similar Messages
-
Animated gif does not work in spry region
Trying to display an animated gif while xml file is loading.
The gif displays while loading but does not animate in the spry region.
<div spry:region="dslistings">
<div id="loadXML" spry:state= "loading"><img src="loadinganimated.gif"/></div>
<div spry:state="ready" </div>
Thank you in advance for any help.
JeffI believe you are correct, I tried to place the same animated gif outside of the spry region
and it also did not animate until the xml (approximately 500 records) loaded and completed displaying.
Once the xml loaded, the gif outside of the spry region started to animate.
So how then could you display some sort of animated loading indication?
Thank you
jeff -
How do I display on-the-fly generated XML on a web page using DW CS4 Spry regions?
On a main web page I'm trying to display formatted data from an ASP page that generates XML on-the-fly from a query.
When I run the ASP page from the browser, the XML formatting of the data works. But when I run the main web page, the data doesn't display.
I'm using DW CS4 Spry regionsto display the data on the main page from the XML data generated by the ASP page. Here's the main page code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache" >
<html>
<head>
<script type="text/javascript" src="SpryAssets/xpath.js"></script>
<script type="text/javascript" src="SpryAssets/SpryData.js"></script>
<script type="text/javascript" src="SpryAssets/SpryUtils.js"> </script>
<script type="text/javascript">var A1D1xml = new Spry.Data.XMLDataSet("A1D1ACRs_testWxmlCode.asp", "tests/test");</script>
<title>Test XML Main</title>
</head>
<body>
<div id="A1D1xml" spry:region="A1D1xml">
<table id="A1D1">
<tr>
<th>ID</th>
<th>Last Name</th>
<th>Final Status</th>
</tr>
<tr spry:repeat="A1D1xml">
<td>{acr_id}</td>
<td>{acr_lastName}</td>
<td>{acr_final_status}</td>
</tr>
</table>
</div>
</body>
</html>
Here's the code for the page that generates the XML: A1D1ACRs_testWxmlCode.asp
<html>
<%
set objConn=server.CreateObject("ADODB.Connection")
objConn.Open application("web_test")
set rs = objConn.Execute( "SELECT acr_id, acr_lastName, acr_final_status from acr_records_grid_view where acr_changeOption = 'A1D1'")
Response.ContentType = "text/xml"
Response.AddHeader "Pragma", "public"
Response.AddHeader "Cache-control", "private"
Response.AddHeader "Expires", "-1"
%>
<?xml version="1.0" encoding="utf-8"?>
<tests>
<%While (NOT rs.EOF)%>
<test>
<ID><%=(rs.Fields.Item("acr_id").Value)%></ID>
<acr_lastName><![CDATA[<%=(rs.Fields.Item("acr_lastName").Value)%>]]></acr_lastName>
<acr_final_status><![CDATA[<%=(rs.Fields.Item("acr_final_status").Value)%>]]></acr_final_s tatus>
</test>
<%
rs.MoveNext()
Wend
%>
</tests>
<%
rs.Close()
Set rs = Nothing
%>
</html>
Thanks.Thanks, but no; I'm using the correct case and folder.
With this code on the main page, The region flashes the table column header names
and the code as written for the spry repeat; then instantly disappears from the screen.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="SpryAssets/xpath.js"></script>
<script type="text/javascript" src="SpryAssets/SpryData.js"></script
<script type="text/javascript">var A1D1x = new Spry.Data.XMLDataSet("A1D1ACRs_testWxmlCode.xml", "tests/test");</script>
<title>Test XML Main</title>
</head>
<body>
<div id="A1D1" spry:region="A1D1x">
<table id="A1D1a">
<tr>
<th>ID</th>
<th>Last Name</th>
<th>Final Status</th>
</tr>
<tr spry:repeat="A1D1x">
<td>{acr_id}</td>
<td>{acr_lastName}</td>
<td>{acr_final_status}</td>
</tr>
</table>
</div>
</body>
</html> -
Hiding Columns in a Spry Region
Hello All,
I'm using the SpryDOMUtils.js to hide columns in my SPRY table. Everything works fine when I load the page except when I add the LoadListener to hide the columns when the page generates:
function hideColumn(){
Spry.$$("#second th:nth-child(n+5),#second td:nth-child(n+5)").toggleClassName("hideIt");
changeText("button2","Hide Detail","Show Detail");
Spry.Utils.addLoadListener(function(){
hideColumn();
After the page loads the columns are hidden like they are supposed to but the show button will not 'show' the columns and the code seems broken. Sorry I cannot post a link the code as it is on a Intranet.
I have followed the example on http://labs.adobe.com/technologies/spry/samples/dom_utils/hide_columns.html but maybe it is because it is in a spry region?
Cheers!
KevinI'm assuming that by "Spry Table" you meant that you are using a Spry region to generate a table. If so, you need to trigger your code from an onPostUpdate observer instead of triggering it after the page loads. The reason is that even though the page has loaded, the data sets that load your data still might not have completed loading ... so your region may not have been processed until *AFTER* the onload event fired.
Take a look at this example:
http://labs.adobe.com/technologies/spry/samples/data_region/RegionObserverSample.html
--== Kin ==-- -
I'm trying to add a region.addobserver and addEventListener to spry regions so the links; that come for a external feed, opens in a new(default browser) window when clicked. The on* events in regions do not work in AIR so, is there a way to do this?
I have read a lot of the documentation on spry regions, addObserver and the addEventlistener but the samples don't deal with anything about external xml feeds with links in a spry region for a AIR app.
The closiest i saw was the gallery http://labs.adobe.com/technologies/spry/articles/air/photo_gallery.html, but it doesn't deal with:
links,
in a external RSS feed,
in the spry region,
to a new default browser.
Has anybody tried this before? Can it be done?
Ex:
<div spry:region="rssDataNews" class="SpryHiddenRegion">
<div spry:state="loading" id="notification2">Loading feeds, please wait ...<img src="assets/spinner.gif"></div>
<div spry:state="error">Failed to load data! Please try again later</div>
<table width="100%" spry:state="ready">
<tr spry:repeat="rssDataNews" class="{ds_EvenOddRow}" spry:select="mySelectClass">
<td class="cellPad">
<span style="font-weight:bold">{title}</span><br /><br />
{description}<br />
<a href="{link}" target="_blank">[Read full article]</a><br /><br />
</td>
</tr>
</table>
<div>
The <a href > only opens the url in the native AIR window. I need it to open in a web browser.
Message was edited by: dee12345654321About on* events
They do work, but not as attribute on your HTML elements, you will need to use eventlisteners to attach them on the relevant nodes.
How: http://labs.adobe.com/technologies/spry/samples/dom_utils/add_event_listener.html
About links
Currently in Adobe AIR, its not (easily) possible to open or execute other programs on the users PC. I have seen die hard hacker user Java to get around this limitation. But i suggest you check out the Adobe AIR forum to confirm that you cant open links in the users browser.
But, Adobe AIR is basically a browser -
Spry region drop-down list problems in IE
Can someone please help me determine the reason that IE does not display the correct item in a spry region drop-down list when first opening the site. You can see the problem at http://www.minursemap.org/agedistnurse.html. The initial item in the drop-down list should be Alcona with the corresponding graphic displayed in the detail region. In Firefox, this works correctly. When first opening the page in IE, the graphic is Alcona, but the drop-down list displays Wexford (the last item in the list). From then on, all of the links work correctly.
The code for the two regions is below. Thanks in advance for assisting someone new to spry.
<div id="ctyname">
<div spry:region="dsChartNurse">
<select name="name" spry:repeatchildren="dsChartNurse" onchange="dsChartNurse.setCurrentRow(this.value)">
<option value="{ds_RowID}">{name}</option>
</select>
</div> <!--spry:region close -->
</div><!--ctyname close -->
<div id="image">
<div spry:detailregion="dsChartNurse">
<div align="center" style="padding-bottom:15px"><img src="{dataimage}" width="405" height="202" />
</div><!--un-named div close -->
</div><!-- spry:detailregion close -->
</div><!--image close -->Try the following code to replace yours:
<select name="name" spry:repeatchildren="dsChartNurse" onchange="dsChartNurse.setCurrentRow(this.value)">
<option spry:if="{dsChartNurse::ds_RowID}=={dsChartNurse::ds_CurrentRowID}" spry:selected="selected" value="{ds_RowID}">{name}</option>
<option spry:if="{dsChartNurse::ds_RowID}!={dsChartNurse::ds_CurrentRowID}" value="{ds_RowID}">{name}</option>
</select>
I hope this helps.
Ben -
I'm developing an interactive menu using the Spry and Ajax framework that lists the menu items on the left (in a Spry accordion) to a corresponding image and description on the right. I have the basic functionality working, however, my menu items are broken into sub categories, and I can't seem to get my XML file to separate these.
For an example of what I'm trying to do, visit here: http://bit.ly/g0RrU
As you can see, my menu is broken into sections; i.e. Tapas, Pizzas, Entrees...etc. Do I need to link a separate XML file to each of these sections, or can I simply make one more generation in my XML file.
For instance, could my XML file look like this:
<?xml version="1.0" encoding="UTF-8"?>
<menu>
<tapas>
<item>
<name>Fresh Tilapia Dip</name>
<title>Fresh Tilapia Dip</title>
<image>../one0one/images/food/crab_cakes.jpg</image>
<desc>Mesquite Smoked Fresh Fish w/ Tortilla Chips and Pickled Jalapenos $6.99</desc>
</item>
<item>
<name>Jamaican Jerk Chicken Satay</name>
<title>Jamaican Jerk Chicken Satay</title>
<image>../one0one/images/food/satay.jpg</image>
<desc>Served with Pineapple Chutney w/ 101’s Spicy Tartar. $9.99</desc>
</item>
</tapas>
<pizzas>
<name>Pizza1</name>
<title>Pizza1</title>
<image>img.jpg</image>
<desc>description</desc> </pizzas>
</menu>
This is actually how it is currently set up, but when I link the XML file to a Spry region, it ignores the <tapas> and <pizzas> categories, and goes straight to the <item>. What's the best practice to achieve this menu effect?What version of Spry are you using? If you are going to work
Spry and AIR, you will need Spry 1.6.1 to work within AIR's
application sandbox. You can find the details here:
http://labs.adobe.com/technologies/spry/air.html
and a case study that shows what I had to do to make the
Photo Gallery work in AIR 1.0 here:
http://labs.adobe.com/technologies/spry/articles/air/photo_gallery.html
--== Kin ==-- -
Accessing form elements within a Spry region.
Since nested Spry regions isn't yet support, can someone tell
me how to access and modify form elements within a existing region?
For example, I have a region that displays a form based on
data I defined in a javascript array. On of the form elements is a
select with some options. I want to added and remove options to
this select depending on the number of objects in the data array.
The select is not defined when I try to access it after spry
has finished rendering the form, eg
document.forms[0].selOrder1.options.length = 0;
How are Spry regions attached to the browser's DOM? Does Spry
create it's own DOM subordinate to the main DOM?
Is it possible to make changes to a Spry region without using
Spry?
thx
pwpActually, there are a couple of ways to get access to the DOM
underneath a region container. If you have a region, you can put an
ID attribute on the region container node, or if you are using a
region observer, the data passed into the observer has a regionNode
property. So if you want access to the region DOM anytime the
region is re-generated, do something like this:
function myRegionObserver(notificationType, notifier, data)
// We only want to do something after the region is
re-generated,
// for all other notifications, do nothing.
if (notificationType != "onPostUpdate")
return;
// If your region container element has an ID on it, just
use
// getElementByID. This is useful in the case where your
observer
// is only ever registered with one region.
var rgnElement1 = document.getElementById("headerRegion");
alert(rgnElement1.innerHTML);
// Or you can simply use the regionNode property of the data
// that is passed in. This is useful if you've registered
the same
// observer on multiple regions. The regionNode property
will
// contain the region container node for the region that is
currently
// being updated.
var rgnElement2 = data.regionNode;
alert(rgnElement2.innerHTML);
Spry.Data.Region.addObserver("headerRegion",
myRegionObserver);
<div id="headerRegion" spry:region="ds1">
</div>
--== Kin ==-- -
Hi,
I'm a beginner in programming with Adobe Spry so I don't know
if I already understood the Spry concept correctly or if my
question has already been answered in this forum before.
I have got an XML file on my web server which contains the
address data of a single user in the following way:
<?xml version="1.0" encoding="iso-8859-1"?>
<adressbook>
<contact id='1'>
<name>Person 1</name>
<company>his company</company>
</contact>
</adressbook>
The xml file is dynamically generated and can be called with
a GET-parameter "contact" which represents the contact id of the
contact whose address data should be delivered in the response.
Now I read something about the Adobe Spry data set concept.
So I wanted to implement a small address book widget by fetching
the data of a chosen contact from the server in the following way:
<script type="text/javascript">
var contactinfo = null;
function getcontactinfo(contactid) {
contactinfo = new
Spry.Data.XMLDataSet("data.xml.php?contact=" + contactid,
"/adressbook/contact", { useCache: false });
</script>
<div id='names'>
<a href='javascript:getcontactinfo(1)'>Person
1</a><br>
<a href='javascript:getcontactinfo(2)'>Person
2</a><br>
</div>
<div id='info' spry:region="contactinfo">
<table spry:repeatchildren="contactinfo">
<tr><td>name:</td><td>{name}</td></tr>
<tr><td>company:</td><td>{company}</td></tr>
</table>
</div>
My problem is that the spry:region won't be updated after
requesting new data via Spry.Data.XMLDataSet(). If I leave out the
getcontactinfo()-function and simply write something like
var contactinfo = new
Spry.Data.XMLDataSet("data.xml.php?contact=1",
"/adressbook/contact", { useCache: false });
everything works fine. Can anybody help me and could give me
a hint what I might do wrong.
Thanks a lot
André Langer
P.S.: btw. does anybody know if there's an option in the
spry:repeatchildren part to implement a similar behaviour like in
XSL where I could find out the tag names (in Spry the column
names), see
<xsl:for-each select="/adressbook/contact/*">
<tr><td><xsl:value-of
select="name()"/>:</td><td><xsl:value-of
select="."/></td></tr>
</xsl:for-each>Hi Ala,
Look into the setURL and loadData functions.
http://labs.adobe.com/technologies/spry/articles/data_set_overview/
You can so something like
<a onClick="
contactinfo.setURL('data.xml.php?contact={contactid}');
contactinfo.loadData();")
http://labs.adobe.com/technologies/spry/samples/data_region/SetURL.html
Hope this helps.
Don -
Spry:region attributes require one or more data set names as values!
Why am I getting this error ?
http://www.magazooms.com/mzLite/index-php.htmlMaby you have to give the div (or what u use) that holds the
spry:region attribute an id... See this
http://livedocs.adobe.com/en_US/Spry/1.4/help.html?content=WS687EBFF2-AD34-47c5-BEE6-6DBFF 3EB8CCD.html -
ADDT Datepicker and Spry:region
Using ADDT for a datepicker dropdown calendar, the following
code works as expected:
<form action="" method="post">
<input name="test" id="test" value="06/02/2008"
wdg:subtype="Calendar" wdg:mask="<?php echo
$KT_screen_date_format; ?>" wdg:type="widget"
wdg:mondayfirst="true" wdg:singleclick="true"
wdg:restricttomask="yes" />
</form>
When I add a Spry region, the dropdown calendar does not
work:
<div spry:region="ds1">
<form action="" method="post">
<input name="test" id="test" value="06/02/2008"
wdg:subtype="Calendar" wdg:mask="<?php echo
$KT_screen_date_format; ?>" wdg:type="widget"
wdg:mondayfirst="true" wdg:singleclick="true"
wdg:restricttomask="yes" />
</form>
</div>
Anyone have a solution please.
BenAnyone??
-
Formatting tags in xml data set used for spry region
I am trying to put <p>,,,</p> tags in my xml data set but they cause the field to not load. For example I would like to create an xml file as follows:
<blog>
<blogentry>
<blogdate>Jan 2009</blogdate>
<blogtitle>January Blog</blogtitle>
<blogtext><p> this is a paragraph</p>
<p>and so is this</p>
</blogtext>
</blogentry>
</blog>
When I do this I don't get anything in the spry region. If I remove the <p>,</p> tabs it works.
Is there anyway to do this (not just with <p> but with any tags ... ie. tables, etc.).
Thanks/HalI have an online example:
http://www.pearlmanpr.com/perspective_test.html
The spBlog.xml file contains test junk. If I put the <[[CDATA....]]> inside the BlogEntry/BlogText tag it doesn't work at all.
http://www.pearlmanpr.com/perspective_test_2.html
If I use it without the <[[CDATA..]] it doesnt work either.
http://www.pearlmanpr.com/perspective_test_3.html
If I use it without any <> within the tag it sort of works (still needs to be aligned). -
ERROR: spry:region or spry:detailregion attribute has no data set!
here's the basics...
i'm running fusebox for php (if that makes any difference)
i'm also reusing the same gallery for multiple fuseactions,
and using my circuit.xml file to set the var $gallery
depending on which fuseaction has been called.
the photos already exist in a database and full size and
thumbs have already been created by imagemagick
i plan on writing a script that uses imagemagick to get the
dimensions of the imagefiles and saves them to four respective new
columns in my db table (so i hope the problem isn't related to the
height attributes not being set in my xml.... let's hope it's
somthing else, ok?)
i'm creating my datasets like this
quote:
var dsGallery = new Spry.Data.XMLDataSet("/index.php",
"gallery", { method: "POST", postData: "do=m.get<?php echo
$gallery ?>Gallery", headers: { "Content-Type": "text/xml" });
var dsPhotos = new Spry.Data.XMLDataSet("/index.php",
"gallery/photos/photo", { method: "POST", postData:
"do=m.get<?php echo $gallery ?>Gallery", headers: {
"Content-Type": "text/xml"});
the output xml is perfect... here's an example
http://www.inkincnewyork.com/index.php?do=m.getFlashGallery
since i'm reusing the gallery, and have no need for the
dsGalleries related functionality i did this.
using the long way of referencing each piece of data, just to
make sure it's all kosher
quote:
<div id="thumbnails" spry:region="dsPhotos dsGallery">
<div spry:repeat="dsPhotos"
onclick="HandleThumbnailClick('{ds_RowID}');"
onmouseover="GrowThumbnail(this.firstChild,
'{dsPhoto::photo/@thumbwidth}', '{dsPhoto::photo/@thumbheight}');"
onmouseout="ShrinkThumbnail(this.firstChild);"><img
id="tn{ds_RowID}" alt="thumbnail for {dsPhoto::photo/@thumbpath}"
src="{dsGallery::thumbnail/@base}{dsPhoto::photo/@thumbpath}"
width="24" height="24" style="left: 0px; right: 0px;"
/></div>
<p class="ClearAll"></p>
</div>
but i am now getting this error
spry:region or spry:detailregion attribute has no data set!
for each XMLDataSet
anyone have any ideas?A few things I noticed when looking at your sample source
above:
The "Content-Type" should be the type for the post data, not
what you expect to get back. So in your case, you should be using:
"Content-Type": "application/x-www-form-urlencoded";
which is the default type so you don't really have to pass it
to the constructor unless you are posting something other than that
type.
Next, your {ds_RowID} data references are missing the data
set prefix. If you use more than one data set for a given region,
you need to use the prefix to make sure you are getting the
ds_RowID from the correct data set.
The error: "spry:region or spry:detailregion attribute has no
data set!" tells me that the data sets are not defined at the time
Spry first processes the region. Are your data sets being created
in a script tag in the head? Or are you creating them in some
function that gets fired off at a specific time?
--== Kin ==-- -
I've used sIFR for h2 headings, in a page which uses the Spry
Photo Gallery code - within which there is a h3 tag that draws from
the xml file.
The h3 tag doesn't show up when sIFR is used - although there
are other xml elements in the page which still work ok.
As I'm not using sIFR on the h3 tag, it's confusing the life
out of me. Any help much appreciated.
The page is
here
Thanks, Matt.include sIFR script above the SpryData.js
and include the
<script type="text/javascript">if(typeof sIFR ==
"function"){
sIFR.replaceElement("h2", named({sFlashSrc:
"flash/communist.swf", sColor: "#FFFFFF", sBgColor: "#2F0000"}));
</script>
within your Spry:region so its gets rebuild everytime the
region updates.
maby that will help. -
Dreamweaver rewriting spry:region
When I save a template that contains a Spry dataset and
region, Dreamweaver changes the region to "datasetname function".
When the template loads the code is:
spry:region="dsAirsale"
when I save the file, it becomes:
spry:region="dsAirsale function"
Why?I've never seen/heard of this problem. Do you have a sample
file we can look at to reproduce the problem? Are you talking about
saving the .dwt file? Or an HTML file that is an instance of the
template? Is the spry:region inside an editable region?
--== Kin ==--
Maybe you are looking for
-
CAN NOT FIND DESCRIPTION DATA for ACLs in ACL VIEWS
Hi, anyone knows where acl description data stored? (fixed_table, view, sys table) (I know XDB.XDB$ACL and xdb.xs$securityclass objects, but I do not want to parse those xmls) BEGIN DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(acl => '/sys/acls/my.xml', descrip
-
Have problem installing epson printer to ipad2 by wifi
have ip1 & 2. trying to setup epson printer (wifi) to these ipads had the dame thing working but something went wrong. thought I might install however ran into difficulties. hope for an answer
-
Need documentation on HR400, HR110
Hello All, Can anyone share documentation on HR400, HR110 Thanks
-
Hi, I am using an image to replace ugly bullets (list-style-type) and the image is perfectly aligned to the left of each list item in FF and Safari but not in IE. Any ideas on fixes? Is this an IE issue? Many Thanks, Eric
-
Multiple effects (transformations) to an object?
Multiple effects (transformations) to an object Applying multiple transformations to an object and remembering each one is confusing. Which one is rotate, horizontal move etc. So you have to hide/unhide every single one of them, because they all say