Updating div  from two data sets with fading

Hi,
I am trying to do the following: I have a main area where I
want to display an image (main image) of a product. This product
has associated with it a few detail pictures of that product that
are displayed next to the main image. I want to let the user click
on the detail pictures to show the detail picture also in the main
image div. Normally I would know how to do this, but the problem is
that I want to do it with a fade .... I found out how to do the
fading from the example
http://labs.adobe.com/technologies/spry/samples/data_region/DetailRegionEffectsSample.html
but I don't know how to make this wok with the detail area
also linking into the main image div.
I have made an example that displays a table with 3 columns:
the first column shows the main product names, the second columns
the names of the detail pics, and the last column the name of the
main image pic. Choosing a product in the first column makes the
second column and 3rd column indeed update, and the 3rd column
indeed nicely fade. Now I want the user to be able to click the
second column and then show the text selected there in the 3rd
column with the proper fade. Any help is welcome!! And happy
Holidays!
Here is the source code followed by the XML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml"
xmlns:spry="
http://ns.adobe.com/spry">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<title>bla</title>
<script src="../SpryAssets/SpryEffects.js"
type="text/javascript"></script>
<script src="../SpryAssets/xpath.js"
type="text/javascript"></script>
<script src="../SpryAssets/SpryData.js"
type="text/javascript"></script>
<script src="../SpryAssets/SpryNestedXMLDataSet.js"
type="text/javascript"></script>
<script type="text/javascript">
<!--
var ds1 = new
Spry.Data.XMLDataSet("../XML/test.xml","products/item");
var ds2 = new Spry.Data.NestedXMLDataSet(ds1, "pic");
//-->
</script>
<script type="text/javascript">
<!--
var gEffectInProgress = null;
var gPendingSetRowIDRequest = -1;
function fadeInContent(notificationType, notifier, data)
if (notificationType != "onPostUpdate")
return;
var effect = new
Spry.Effect.Fade('mainproduct-picture-contain', { to: 100, from: 0,
duration: 1500, finish: function() {
gEffectInProgress = null;
if (gPendingSetRowIDRequest >= 0)
var id = gPendingSetRowIDRequest;
gPendingSetRowIDRequest = -1;
fadeOutContentThenSetRow(id);
effect.start();
Spry.Data.Region.addObserver('mainproduct-picture-contain',
fadeInContent);
function fadeOutContentThenSetRow(rowID)
if (gEffectInProgress)
gPendingSetRowIDRequest = rowID;
return;
if (rowID == ds1.getCurrentRowID())
return;
gEffectInProgress = new
Spry.Effect.Fade('mainproduct-picture-contain', { to: 0, from: 100,
duration: 1000, finish: function() {
ds1.setCurrentRow(rowID);
gEffectInProgress.start();
//-->
</script>
</head>
<body>
<table border="1">
<tr>
<td width="200" height="200">
<div spry:region="ds1">
<div spry:repeatchildren="ds1">
<div onclick="fadeOutContentThenSetRow('{ds_RowID}');
return false;"/>{name}</div>
</div>
</div>
</td>
<td width="200">
<div spry:region="ds2">
<div spry:repeatchildren="ds2">
<div onclick="fadeOutContentThenSetRow('{ds_RowID}');
return false;"/>{pic}</div>
</div>
</div>
</td>
<td width="200">
<div id="mainproduct-picture-contain"
spry:detailregion="ds1">
<div/>{mainimage}</div>
</div>
</td>
</tr>
</table>
</body>
</html>
Here is the XML
<?xml version="1.0" encoding="utf-8"?>
<products>
<item>
<name>name1</name>
<desc>product 1</desc>
<pic id="1">product1_detailpic1.jpg</pic>
<pic id="2">product1_detailpic2.jpg</pic>
<mainimage>product1_mainpic.jpg</mainimage>
</item>
<item>
<name>name2</name>
<desc>product 2</desc>
<pic id="1">product2_detailpic1.jpg</pic>
<pic id="2">product2_detailpic2.jpg</pic>
<pic id="3">product2_detailpic3.jpg</pic>
<pic id="4">product2_detailpic4.jpg</pic>
<mainimage>product2_mainpic.jpg</mainimage>
</item>
</products>

Can anybody please help with this? I am currently clueless
and pulling out the last hairs on my head !$%^&*
thanks a lot in advance

Similar Messages

  • Urgent Q-adding elements from two data sets

    How to add two fields from two data sets. in RTF template
    the fields have same names too.

    BIPuser wrote:
    If you are grouping within one data set, then the current-group will only work for an element within that group. For the second one, try to use the absolute path or use as many of '../' to get up as many levels from where you are.
    Thanks!I have defined two different groups.
    I need to add the elements from those two diffrent groups.

  • Parts of the Data went missing when linking two data sets

    Hello Everyone!
    I have two data sets for my report:
    1. an essbase cube which is transformed to a relational star shema transformed by BI Administraion, Im calling the cube with sql (not mdx)
    2. a single relational table
    In the report Im iterating on the 'product' dimension of the cube and I need to join the cube with the single relational table, because that table holds all the detailed information on each product (mostly text therefore it is not in the cube).
    What I did was, joined the two data sets with a Master/Detail link. So far so good. But the thing is, more than half of my data goes missing in the xml-Output when I join those too. If I delete the join, all the data is back again in the xml-ouptut but I cant refer to the details of the relational table.
    I tried different things to fix that problem. So I sorted the 1. dataset and joined it again with the 2. dataset. As a result there was still a lot of data missing, but not the same as before.
    I find this behaviour really strange and don't have a clue what to do differently.
    I would really appreciate some help, because I already spent hours trying to fix that problem.
    Thank you!
    Edited by: 981323 on 27.02.2013 06:49

    Thanks for that. Typically I found this 5 minutes after I posted the request on the forum.
    Problem is every time I try and do this the system does not recognise my <?for-each> containing the parameter and says the parameter is not defined. WHen I validate the template it seems to ignore the F completely and complains about to many ends.
    I just can't see why it does not work. I am using four records, 2 of each set I am using which link over item number. I can show them seperately but as soon as I add the variable loop ( <?for-each:/INV_GL/GL[GLLITM= $ITM]?> where ITM is my variable and GLITM is that field in the data) it stops working.

  • Comparing two data sets in BPEL

    Hey guys,
    There exists a web service that provides (and is the source of) data and a table that is independent of the service that holds the same data. I'm writing a BPEL 11g process to sync the data that is returned from the service with the data in the table. I invoke the service and database adapter to receive a collection of the data and I need to compare the two data sets to see what's in the service's data set that isn't in the table's data set, so that I can insert them into the table. I also need to compare the values of the data sets for possible updates to already existent records. I'm not sure how to do this though. I was thinking of using an embedded java activity to compare the two sets. What's the best way to do this? Code examples would be much appreciated.
    Thanks,
    Bill

    Hi Bill,
    How many records are we talking about here? BPEL may not be the best option for synchronisation of large data sets... Probably ODI would be more suitable...
    S.Ananth's solution is probably the simple and neat way to solve your case... would this operation BLINDLY update all records? Short answer: no
    Long answer... Merge first reads the corresponding records in the database, calculates any changes, and then performs a minimal update. INSERT, UPDATE, and MERGE make the most sense when you are thinking about a single row and a single table. However, your XML can contain complex types and map to multiple rows on multiple tables. Imagine a DEPT with many EMPS, each with an ADDRESS. In this case, you must calculate which of possibly many rows have changed and which to insert, update, or delete. If a specific row did not change or only one field changed, then the DML calls is minimal.
    About merge on DBAdapter...
    http://docs.oracle.com/cd/E28280_01/integration.1111/e10231/adptr_db.htm#BDCDBAJI
    Cheers,
    Vlad

  • XML Data Set with Spry Slides - Please Help

    Hi, I'm trying to combine XML Data Set with sliding tabs.
    I've created two keys responsible for sliding the tabs:
    <a id="previous" href="#"
    onclick="sp1.showPreviousPanel();">Previous</a>
    <a id="next" href="#"
    onclick="sp1.showNextPanel();">Next</a>
    Then XML Data Set is used to populate the tabs, but only a
    single tab remains visible, and a "Next/Previous" buttons are used
    to move to the next tab. And this is where the problem arises.
    The problem is that, every time I refreash the gallery or
    load it for the first time, I have to press TWICE the "Next" button
    to move to the next image. After that, its all fine, and slides
    well. It's only the FIRST time when loaded.
    Please help.
    Here's the full code:
    <div id="images_gal" >
    ///////////////////////////////////////// The menu - the
    culprit///////////////////////////////////////////
    <div id="menu_next">
    <a id="previous" href="#"
    onclick="sp1.showPreviousPanel();">Previous</a>
    <a id="next" href="#"
    onclick="sp1.showNextPanel();">Next</a>
    </div>
    //////////////////////////////////////// The Sliding Panels
    Gallery ////////////////////////////////////////////////////
    <div id="example2" class="SlidingPanels" tabindex="0" >
    <div class="SlidingPanelsContentGroup"
    spry:region="dsSpecials">
    <div spry:repeat="dsSpecials" id="{first}"
    class="SlidingPanelsContent{second}"><div class="top_gal"
    ></div><div class="main_gal"><img
    src="images/Galery/{third}" alt="Digital_Signage" width="600"
    height="304" />
    <p class="screen_gal"><a href="#"
    onclick="MM_openBrWindow('film1.html','Coloris','width=340,height=260,
    top=250, left=250')">CLICK TO VIEW</a></p>
    </div><div
    class="bottom_gal"></div></div>
    </div>
    </div>

    Anyone has any idea why I need a DOUBLE Click to start moving
    the sliding panels?
    I've just completed two tutorials by Don Booth.
    1/Building a Spry Sliding Panels widget
    2/Building a photo album with the Spry framework
    But what I try to COMBINE them - display the photos in
    sliding panels, I also need to DOUBLE click the "next" buton before
    it starts scrolling.
    Why is that Double Click needed? Help Please.
    Here's my code for the combined version:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    a {
    position:relative;
    left:23px;
    top:127px;
    z-index:10000;
    color: #FF0000;
    </style>
    <script type="text/javascript"
    src="photo_album_samples/includes/xpath.js"></script>
    <script type="text/javascript"
    src="photo_album_samples/includes/sprydata.js"></script>
    <script type="text/javascript"
    src="Spry/SprySlidingPanels.js"></script>
    <link type="text/css" rel="stylesheet"
    href="Spry/SprySlidingPanels.css">
    </head>
    <body>
    <div >
    <a href="#" onclick="sp1.showPreviousPanel();">Previous
    Panel</a>
    <a href="#" onclick="sp1.showNextPanel();" >Next
    Panel</a>
    </div>
    <div id="panelwidget" class="SlidingPanels" >
    <div class="SlidingPanelsContentGroup"
    spry:region="dsGallery" >
    <div spry:repeat="dsGallery" class="SlidingPanelsContent"
    id="p1"><img
    src="photo_album_samples/thumbnails/{@thumbpath}"/></div>
    </div>
    </div>
    <script type="text/javascript">
    var dsGallery = new
    Spry.Data.XMLDataSet("photo_album_samples/photos.xml",
    "gallery/photos/photo");
    </script>
    <script type="text/javascript">
    var sp1 = new Spry.Widget.SlidingPanels("panelwidget");
    </script>
    </body>
    </html>

  • Data Set with multiple ref cursors

    Hi ,
    I need to design an integrated report , i created my data set with a oracle procedure which returns "multiple ref cursors" . In this case birt is displaying all output columns together and it is difficult to identify which column belongs to which ref cursor and if there are any columns with same name in both output cursors , it displays only one. Is there any way to handle this ? or how we handle a data set which contains multiple ref cursors in output ??

    Having to ref cursors return mutiple recordsets in an Oracle package is like haveng two resultsets return from a MS SQL Server sparc.
    The link may point you in the right direction.
    http://www.codeproject.com/Articles/675933/Returning-Multiple-Result-Sets-from-an-Entity-Fram

  • How to use value from one data set in other data set SQL select.

    Hello all, i have one data set, and i need to get value from that data set into other data set. Something like '?' but without input. I will try to explain it with screenshots:

    If both tables come from the same data source, join the two tables in one data set rather than two as shown. If they are from different data sources, use a 'join data set'

  • Get the month from a date column with the calculated column

    I am trying to get the month from a date field with the help of calculated column. However I get this syntax error whenever I want to submit the formula:
    Error 
    The formula contains a syntax error or is not supported. 
    the default language of our site is German and [datum, von] is a date field.

    Hi,
    I have created two columns
    Current MM-YY
    Calculated (calculation based on other columns)
    Today
    Date and Time
    Current MM-YY is calculated value with formula as
    =TEXT(Today,"mmmm")
    But the output shows as December instead of May.
    I have tried =TEXT([Datum, von];"mmmm") but no help.
    I am trying to populated the column automatically with current month..ex: if its May the field should show May, next month it should show June an so on.
    Any kind help is grateful.
    Regards,
    Pradeep

  • How do I link a Spry data set with a detail region to a html web site?

    I have created a spry data set with a detail region. It works well. However, I would like to have a link from the detail region to another html web site. Can anyone help with the code? Below is the spry data set.
    <?xml version="1.0" encoding="utf-8"?>
    <books>
    <book>
    <title>The Advnentures of Crunchy and Munchy Squirrel: Field Nuts</title>
    <author>Levester Williams</author>
    <image>images/portfolio/tn_adventuresOfCrunchyAndMunchySquirrel.jpg</image>
    <description>This delightful book for young readers teaches the importance of obedience and always doing what you know is right.</description> I
    <weblink >www.crunchyandmunchy.com</weblink>
    </book>
    <book>
    <title>More Dirty Little Secrets</title>
    <author> Dr. Claud Anderson and Brant Anderson</author>
    <image>images/portfolio/tn_moreDirtyLittleSecrets.jpg</image>
    <description>In More Dirty Little Secrets, Dr. Claud Anderson and his son Brant Anderson, piece together little known facts about Black people, thier achievements, influence, involvement, tribulations and present them with wit and humor.</description>
    <weblink>http://powernomics.com/</weblink>
    </book>
    </books>

    Hi,
    In your html page, use the following notation:
    <a href="http://{weblink}" title="{weblink}" target="_blank">{weblink}</a>
    I hope this helps.
    Ben

  • Get the Common from Two Internal Tables with same structure

    Hi ,
    I need to get the Common data from Two Internal Tables with same structure with using the looping method.
    For e.g.
    I have two internal table say ITAB1 and ITAB2.
    ITAB1 has values A,B,C,D,E,F
    ITAB2 has values A,H,B,Y,O
    Output at runtime should be : A,B

    Hi mohit,
    1. If u want to compare all fields,
       for matching purpose,
       then we can do like this.
    2.
    report abc.
    data : a like t001 occurs 0 with header line.
    data : b like t001 occurs 0 with header line.
    loop at a.
      LOOP AT B.
        IF A = B.
          WRITE :/ 'SAME'.
        ENDIF.
      endloop.
    ENDLOOP.
    regards,
    amit m.

  • Combining Data into one Cube from two Data-sources..

    Dear Experts,
    I am pulling data from two data sources and trying to combine in one Info-Cube. The data are like
    Data-Source 01
    1. GUID  --Common
    2.Document No ( User Entry)
    3.Dist. Channel
    4.Transaction Type
    5.Date and Quantity
    Data-Source 02
    1.GUID -- Common
    2.Billing Document ( If User drill down according to Document No , Billing Document should come in the report )
    3.Billing date
    4.Net Value
    Out of the datas , The GUID is common between the 2 data-sources.  I was thinking that, tha data will take according to its place and If i select the Document No in Report, it will atomatically fetch all the data like Tran type, dist ch, Billing Document No , Billing date.. .
    The problem is , in the report Tha data is not coming as I was thinking.
    And Another problem is , In future I need to create a Multiprovider between the above mentioned Info-cube and One ODS. And  DOCUMENT NO is common in Cube and ODS.
    Please Suggest,
    How can I proceed for the following requirement.
    Thanks,
    Sanjana

    Hi Sanjana,
    In your case cube will create a problem because it will have multiple records . For example :
    Data-Source 01 :
    1. GUID -- 101
    2.Document No - 999
    3.Dist. Channel - DL
    4.Transaction Type - GPRO
    5.Date and Quantity - 20.02.2011 & 20
    Data-Source 02
    1.GUID -- 101
    2.Billing Document - 6000
    3.Billing date - 03.03.2011
    4.Net Value - 500
    Your cube will have 2 records . And your requirement is to show above two records in 1 record in the report .
    Why dont you make an ODS in between , where you can put GUID as the Key field and rest all the fields as data fields. Create 2 transformations to this DSO from the 2 datasources . And let it get updated one by one . Your DSO will have 1 record only . Now either you do reporting on this DSO or take the data to the cube .
    Hope the above reply was helpful.
    Kind Regards,
    Ashutosh Singh
    Edited by: Ashutosh Singh on May 19, 2011 1:34 PM

  • Comparing data in two data sets in Oracle BI 11g

    Hello,
    I'm trying to compare the PO status of two systems and display the ones that donot have the same status. I'm able to join the data-sets with the link but unable to compare them. Can you please tell me?

    Are you referring to BI Publisher 11g links !! Shed some light on your issue.
    -bifacts

  • How to generate a number from two dates

    I am 'new' at this of using Numbers for anything.  What I want to do AND I can't seem to figure it out, is to generate a 'days total' from two dates.  I get paid S.S. on the 2nd Wednesday of each month.  I have X number of dollars to spend.  In order to view each day how much money I have for the rest of the month, I need to be able to obtain how many days are left in the period.  I know what the fixed day is for the end and could key that in.  I want it to be able to take the current day for the calculation without my having to key IT IN each day.  Then I could use that returned number for other functions.  I did look into "Functions" screen on the right hand side, read them several times, tried some but have not succeeded.  Can someone here help this 68 year young man to figure this out?  Thanks

    you can use the function TODAY() to get the date.
    then you can compute a duration (the difference between two dates).  Data/time is a single type of variable in Numbers.  Meaning that a complete date/time value includes both a date and a time.  When you enter one without the other Numbers assumes the other portion.
    you can subtract any two dates to get the duration.
    The format for a date is:
    1/2/2015 12:09A
    2 Jan 2015 12:09A
    a duration would look like:
    3w 4d 6h 15m 45s 76ms
    Three weeks, four days, six hours, fifteen minutes, forty five seconds, seventy six milliseconds
    you can use any combinations of these parts for a duration
    A1
    =TODAY()
    B1
    =EOMONTH(TODAY(),0)
    C1
    =B1−A1

  • In a update rule, run two data packages ; package by package not secuencial

    HI, my data source is an ods i want to fill other ods.
    If i have two data packages, with 7000 and 5000 registers
    i want to run the two datapackages in a secuencial way not parallel.
    But the init delta doesn´t give me the option of run package by package.
    The options show me is initialization with transfer data (parallel) i want package by package.
    How i can do that??
    Reward points

    a

  • Displaying data from one data set when a field is null in other data set

    Hi All,
    I have a report where I need to show some columns from one data set(Ex: SsOpportunity) ....... when there is no data in a column (Ex: "Petrofac-ProductLine") in other data set (Ex: SsRevenue) in one table. I have another table which shows data from SsRevenue when there some data in "Petrofac-ProductLine" column.
    The first table is not working for me. Kindly suggest me where to specify the condition.
    Thanks in advance,
    Imtiaz.

    Will it be possible for you to send me a sample xml and RTF?

Maybe you are looking for

  • E71 Firmware Upgrade Step-by-Step (Undocumented Ti...

    Although Nokia's firmware upgrade claimed to be smooth using Nokia Suite, the fact it is not. There are many things which could interfere with the process. For example upgrading E71-1 firmware from 100.07.76 to 110.07.127 is not always trouble free.

  • IMP.EXE has encountered a problem and needs to close

    Dear all, I have a dmp file which need to import into the oracle9i database. The dmp file size which is 1.6GB. Im using the imp cmd to run the import. When importing half way, i encountered an error which is IMP.EXE has encountered a problem and need

  • Shuts Off with No Warning

    I've had my MacBook plugged in and turned on pretty much steadily for the past month or so (something I've done before with no problems). In the past few days, it has just suddenly shut off -- instantly -- a number of time. Doesn't go to sleep -- jus

  • Only 90MB disk space after installing iLife '11 - how to move iLife?

    Hi, my installation of OS X is on a small SSD and I just barely had enough space to install iLife '11. I need more free disk space though so I need to move the largest iLife programs or maybe the whole thing. Obviously I wouldn't be posting here if t

  • Create a 2-dim array dynamically

    Hello! I have had this problem here before but try one moore time :-) This is the thing: We have a text-file from which we read. This textfile can be different from time to time. From this textfile we can catch numbers of columns and numbers of rows