Trying to come to grips with sliding panels and datasets

Hi there!
I've just started looking into Spry (love it so far!) but
having an issue combining the sliding panels widget and a Spry
dataset. The widget works fine and the dataset works fine when
seperate, but I come up against some problems when I combine them.
As a guide, I've been using the following page:
http://www.pixelz.co.uk/spryArticle.htm
(copy of the article in the Spry Zip file)
and using the Scenario 2 example at the end of the page.
Unfortunately, there were a few bugs in it (like a colon
where there should have been a semicolon and no titles in the
navigation <a> tags at the top) so I did a little debugging
and tied in my own dataset. The code that is running on this page (
http://www.pixelz.co.uk/spryTest.html)
looks like so:
quote:
<head>
<script language="javascript" type="text/javascript"
src="includes/xpath.js"></script>
<script language="javascript" type="text/javascript"
src="includes/SpryData.js"></script>
<script language="javascript" type="text/javascript" >
var dsTest = new Spry.Data.XMLDataSet("data/xmlTest.xml",
"specials/menu_item");
</script>
<script language="javascript" type="text/javascript"
src="includes/SprySlidingPanels.js"></script>
<link href="includes/SprySlidingPanels.css"
rel="stylesheet" type="text/css" />
</head>
<body>
<div spry:region="dsTest" spry:repeatchildren="dsTest">
<a href="#"
onclick="sp1.showPanel('detail{ds_RowID}');">Page
{ds_RowID}</a>
</div>
<div id="sPanel" class="SlidingPanels"
spry:region="dsTest">
<div class="SlidingPanelsContentGroup"
spry:repeat="dsTest">
<div id="detail{ds_RowID}"
class="SlidingPanelsContent">
<h3>{item}</h3>
<p>{description}</p>
<p><strong>{price}</strong></p>
</div>
</div>
<script language="javascript" type="text/javascript">
var sp1 = new Spry.Widget.SlidingPanels("sPanel");
</script>
</div>
</body>
The problem I'm having is that the panels don't change when
the links are clicked. It seems to pull in the data fine, but the
panels dont switch.
When I looked at the generated source, it doesn't look quite
right:
quote:
<body>
<div id="spryregion1" class="">
<a onclick="sp1.showPanel('detail0');" href="#">Page
0</a>
<a onclick="sp1.showPanel('detail1');" href="#">Page
1</a>
<a onclick="sp1.showPanel('detail2');" href="#">Page
2</a>
<a onclick="sp1.showPanel('detail3');" href="#">Page
3</a>
</div>
<div id="sPanel" class="SlidingPanels" style="overflow:
hidden;">
<div class="SlidingPanelsContentGroup" style="left: 0px;
top: 0px;">
<div id="detail0" class="SlidingPanelsContent
SlidingPanelsCurrentPanel">
</div>
</div>
<div class="SlidingPanelsContentGroup" style="left: 0px;
top: 0px;">
<div id="detail1" class="SlidingPanelsContent
SlidingPanelsCurrentPanel">
</div>
</div>
<div class="SlidingPanelsContentGroup" style="left: 0px;
top: 0px;">
<div id="detail2" class="SlidingPanelsContent
SlidingPanelsCurrentPanel">
</div>
</div>
<div class="SlidingPanelsContentGroup" style="left: 0px;
top: 0px;">
<div id="detail3" class="SlidingPanelsContent
SlidingPanelsCurrentPanel">
</div>
</div>
</div>
</body>
I'm not sure, but I think the repeating region is a bit
screwy, but I'm really not sure where to proceed from here.
Any help would be appreciated! Thanks!
Gareth

Right - fixed it!
<div class="SlidingPanelsContentGroup"
spry:repeat="dsTest">
<div id="detail{ds_RowID}"
class="SlidingPanelsContent">
should have read
<div class="SlidingPanelsContentGroup">
<div id="detail{ds_RowID}" class="SlidingPanelsContent"
spry:repeat="dsTest">
oh well...

Similar Messages

  • FORMS IN go daddy - email forms, anyone know whats happening with c-panel and adobe email forms...

    FORMS IN go daddy - email forms, anyone know whats happening with c-panel and adobe email forms...

    Hi,
    Can you please provide the URL of your website ?  And also the email address to which you are trying to send the form.
    Regards,
    Rohit Nair

  • When I open my MacBook Air the keyboard comes up along with the screen and does not stay still?!

    When I open my MacBook Air the keyboard comes up along with the screen and does not stay still. So I need to hold down the keyboard while i open it. Other than that it works fine despite the fact that the fan noise some times is loud and sometimes it's getting warm at the base. I wonder if this can be fixed if i go to one of the apple branches.

    Yes. Take the computer to the Apple store to have it fixed.
    Best

  • I am trying to sync my ipad with my computer and keep getting the following message: iTunes could not check for an update to the carrier settings in your ipad.  an unknown error occurs (1631).  what do I do??

    am trying to sync my ipad with my computer and keep getting the following message: iTunes could not check for an update to the carrier settings in your ipad.  an unknown error occurs (1631).  what do I do??

    The search bar can be very valuable...........
    In using it, I found out other's have had this issue and it likely means you have a 3G iPad?  If you do, go into settings and turn off cellular data, then try to update again and you should be OK........

  • How to copy and paste the graphics from illustrator to MS word. What I tried is exporting in png with highest resolution and then inserting in to word. This loses a bit of resolution in comparison to direct copy and paste as EMF.  But if I do a copy and p

    How to copy and paste the graphics from illustrator to MS word. What I tried is exporting in png with highest resolution and then inserting in to word. This loses a bit of resolution in comparison to direct copy and paste as EMF.  But if I do a copy and paste, and then take a print of the document, all the graphs and text is printed upside down, flipped back.

    Use the Pencil Tool
    alex
    adrian stock wrote:
    > How to copy and paste a single pixel
    >
    > I want to copy a single pixel and then paste it in the
    position of
    > another pixel in the same image.
    >
    > (This is in effect changing the colour of the target
    pixel, isn't it.
    > But in my case copying an existing pixel seems simpler
    than selecting a
    > colour from the swatch or using the colour picker.)
    >
    > What is the most efficient way of doing this?
    >
    > I tried to select one pixel with the marquee tool. Then
    copied it with
    > control-C, but then how do I select the target pixel and
    paste with
    > control-V?
    >
    > Thanks for your help.
    >
    > Adrian
    >

  • The password for wireless network was changed.  Airport keeps trying to sign in automatically with old password and won't let me put in new password. Any ideas?

    The password for wireless network was changed.  Airport keeps trying to sign in automatically with old password and won't let me put in new password. Any ideas?

    You really should change both the wireless network name and password to avoid potential conflicts with the old and new settings.
    Suggest you give that a try.

  • Just tried to sync my ipad with my macbook and the ipad seems to have frozen and i can't switch it off or open any app

    just tried to sync my ipad with my macbook and the ipad seems to have frozen and i can't switch it off or open any app

    Hold down the Sleep/Wake button and the home button together until the apple logo appears (ignore the ON/OFF slider) then let both buttons go and wait for device to restart (no data will be lost).

  • I bought my daughter an ipad mini and used my Apple ID to transfer over her favorites. Now I can't use netflix and hulu. So I want create her an id but it won't let saying too young. I tried to create another one with my age and it still says too young.

    I bought my daughter an ipad mini and used my Apple ID to transfer over her favorites. Now I can't use netflix and hulu. So I want create her an id but it won't let saying too young. I tried to create another one with my age and it still says too young.help!!!

    iTUNES STORE - TERMS AND CONDITIONS
    "This iTunes Service is only available for individuals aged 13 years or older, unless you are under 13 years old and your Apple ID was provided to you as a result of a request by an approved educational institution. If you are 13 or older but under the age of 18, you should review this Agreement with your parent or guardian to make sure that you and your parent or guardian understand it."
    Restart the iPad. Tap Settings > iTunes & App Store then sign in your Apple ID.

  • I am trying to burn a CD with a cataog and a sideshow, when I burn one the pictures in the sideshow are blurry

    I am trying to burn a CD with a cataog and a sideshow, when I burn one the pictures in the sideshow are blurry

    Microsoft Windows XP Professional Service Pack 2 (Build 2600)
    Freeline Freeline Series
    iTunes 10.2.2.14
    QuickTime 7.6.9
    FairPlay 1.11.17
    Apple Application Support 1.5.1
    iPod Updater Library 10.0d2
    CD Driver 2.2.0.1
    CD Driver DLL 2.1.1.1
    Apple Mobile Device 3.4.0.25
    Apple Mobile Device Driver 1.55.0.0
    Bonjour 2.0.5.0 (214.3)
    Gracenote SDK 1.8.2.457
    Gracenote MusicID 1.8.2.89
    Gracenote Submit 1.8.2.123
    Gracenote DSP 1.8.2.34
    iTunes Serial Number 0012AB30077CFFD0
    Current user is an administrator.
    The current local date and time is 2011-05-29 14:40:36.
    iTunes is not running in safe mode.
    WebKit-accelerated compositing is enabled.
    HDCP is not supported.
    Core Media is supported.
    Video Display Information
    RADEON X600 Series
    RADEON X600 Series
    RADEON X600 Series Secondary
    **** External Plug-ins Information ****
    No external plug-ins installed.
    iPodService 10.2.2.14 is currently running.
    iTunesHelper 10.2.2.14 is currently running.
    Apple Mobile Device service 3.3.0.0 is currently running.
    **** CD/DVD Drive Tests ****
    LowerFilters: PxHelp20 (2.0.0.0),
    UpperFilters: GEARAspiWDM (2.2.0.1),
    F: PHILIPS PBDV1640P, Rev B3.4
    Media in drive is blank.
    Get drive speed succeeded.
    The drive CDR speeds are:   8 12 16 24 32 40.
    The drive CDRW speeds are:   8.
    The drive DVDR speeds are:   8.
    The drive DVDRW speeds are:   8.
    Force Optical Power Calibration before burn is turned on in the preferences.
    The last failed audio CD burn had error code 4261(0x000010a5). It happened on drive F: PHILIPS PBDV1640P on CDR media at speed 8X.

  • I'm trying to set up Continuity with mac mini and iPhone 5s and not working

    I'm trying to set up Continuity with mac mini and iPhone 5s and not working, bluetooth not pairing

    Your Mini is not supported.
    Connect your iPhone, iPad, iPod touch, and Mac using Continuity

  • My ipod nano 6th gen screen is white ive tried the hard disk mode with the power and volume buttons and it still wont work any suggestions?

    my ipod nano 6th gen screen is white ive tried the hard disk mode with the power and volume buttons and it still wont work any suggestions?

    You can try Restoring it in iTunes but I believe you will end up needing to have it serviced.

  • My wifi will not turn on. The button is settings seems to be locked. I tried turning it on from the control panel, and also with Siri, but it still does not turn on in settings, so i cannot access wifi. Please help ASAP

    Wifi will not work. The button in settings seems to be locked. Tried control panel and siri to turn it on, doesnt work because the settings wont turn it on. Need help ASAP cause my data limit is approaching.

    If the battery was completely drained the iPad will not respond for some time after connecting it to the charger. Connect the iPad to the charger that came with it and plug that into a good wall outlet. Wait 30 minutes. Then reset the iPad.Press and hold both the Home button and the Sleep/Wake button continuously until the Apple logo appears. Then release the button and let the device restart. You will not lose data doing this. It's like a computer reboot.
    If the iPad restarts let it continue to charge until it's battery shows fully charged. If the iPad still does not start Make an appointment at an Apple Store to have your device examined by a technician. Or contact Apple Support. Be sure to back up your device before taking or sending it to Apple.

  • Problems with Sliding Panels in IE

    I have *finally* gotten my sliding panels script working
    properly. However (and not surprisingly), I am having an issue with
    the addClass and removeClass functions. Although they work properly
    in Firefox, in IE 6 and 7 the add and remove class functions are
    not working properly.
    Any ideas on this?
    Here's the
    example
    Thanks, as always!
    Joel

    Mellymel2000 wrote:
    > Hi There,
    > I'm new to CS3 and can't understand why my animated
    collapsible panels don't
    > work in Internet Explorer. Did I miss some basic notes
    somewhere? Is it just IE
    > 5.2 it doesn't work in? I have created a vertical menu
    bar with them and need
    > to know If it can't be done here does anyone know how
    else I might go about it?
    > Starting to feel a little desperate and any help would
    be welcome.
    > Cheers!
    >
    >
    Is that IE 5.2 on the Mac? If so, don't worry about it, test
    it on IE6
    on a PC instead. The last Mac IE was 5.5 and has not been
    developed in
    about 5 years, its dead, and not a lot works on it nowadays.
    On Mac test
    Safari and Firefox, same on PC but with Opera and IE6 and 7.
    Steve

  • Sliding Panels and Detail Regions

    I'm trying to get a detailregion div to update whenever the
    panel in a sliding panels widget changes. Basically, whatever panel
    it's on, the detailregion div will change depending on what that
    panel is. Is this possible? I've tried using setrow but I'm not
    sure if I'm doing it right.

    Hi, thanks for your reply.
    At the moment the player does stops when you go to another page (not slide) and doesnt keep playing. Its all working very well on the pages. See test page
    http://homepage.mac.com/nigelgrimshawjones/Candy_Lane/index.html
    Its just that on the shows events page there are sliding panels where we go through each show. For each new show (panle) she wants a different song to automatically play.
    I have set it up with a seperate player for each slide but unlike going from page to page, from slide to slide the music doesnt stop by itself. The test site has the old version with just one player at the top.
    There probably is something I could do in Flash but I dont know what. Its a complicated thing (for me)
    I was wondering if I could just use html music for those slides. I only need one song to play for each slide. But I need the song to stop when it goes to the next slide, (and the next song to start obviously)
    Any ideas are much appreciated. This job is supposed to be finished and its the last request from the client.
    Nige

  • Export to PDF from Autocad: Acrobat always opens PDF with 'layers panel and page' shown.

    Hello,
    Whenever I export to PDF from Autocad, Adobe Acrobat opens the PDF with the 'Layers Panel and Page' shown.
    Each time I have to manually go to 'Properties' and select 'Page only', close 'Properties' and close the PDF and select to save the changes, in order to show the just the page.
    Is there a way to make PDFs always export to 'Page only' automatically as default?
    Thanks!
    Ione

    Thakns Peter, I had seen this thread, but it doesn't really address my issue. I've exported individual chapters from the book file, all with success, so I know there isn't a file corruption issue.  The problem seems to do more with memory allocation/usage. 
    I have tried: quitting and then immediately exporting the file, and even rebooting and then relanuching and exporting.  Both of these allow me to get a few pages farther along, but still not through the entire book.
    I remember back in the day there used to be a setting for how much RAM/dis c space was allocated to a certain applicatino (I knowm it was a long time ago).  I didn't know if there might be something like this hidden somewhere

Maybe you are looking for

  • How do you combine to partitions into one complete

    my imacs harddrive is currently formatted into two different partitions one has my main Mac OS X lion on it and the other originally had snowleopard on it. i have formatted it but am unsure how to combine the empty partion with the Mac OS X one?

  • The Origin of Random iChat video failu

    I hope this topic gets a lot of response and reply from as many people as we can get involved. If you are like me you have been using iChat more of less happily for some months and then suddenly all **** breaks loose and you cannot initiate chats wit

  • Clubbing two Pl Order to one prod Order

    Hi, In MTO scenario we have two Sales orders from two different customers for the same FG and two pl orders are generated after MRP now we want to have a single prod Order for these two as production people does not bother about customers while produ

  • Different between ASA-5520-K9 & ASA-5520-K8

    Hello Dear ... We were using ASA-5520-K9 with  ASA-SSM-AIP-20-K9 but recently found some hardware problem in our running ASA. Now cisco want to replace with ASA-5520-K8. can any one please advise me what features we will miss or get. thanks in advanc

  • How attach movie using varable

    I need to know how to attach a movie to a movie whos name is stored in a varable. First I dynamically attach a movie then I need to attach another movie inside that movie. The problem is I can not discover how to attach a movie whos name is store in