Creating links in repeat regions

How do I link a downloadable word document in a repeat region displaying information from a database. The word document would be different for each record. Thanks.
I posted this question 9 hours ago and have not received a reply. I am not sure that you understant my question and so I will try to make it clearer.
1. I created a database and stored the name of the word document in the cv_name field.
2. I created a repeat region that displays the name of the word documents in the recordset
3 All I need to do is to link the name of the word document to the word file in dreamweaver
4 I highlight the name field, open the property inspector, click the folder icon, set the link to use Data Sources, and select the recordset column that holds the word document name.
5 However when I click on the file name that is displayed on the website I get an error.
Thanks for any assistance

Hi Avci,
Try this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<HTML><HEAD><TITLE>Home</TITLE>
<META http-equiv=Content-Type content="text/html;
charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1458" name=GENERATOR>
<style>
.redlnk {
FONT-SIZE: 9px;
COLOR: red;
LINE-HEIGHT: 15px;
FONT-STYLE: normal;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
TEXT-DECORATION: none;
.redlnk:hover{
FONT-SIZE: 9px;
COLOR: red;
LINE-HEIGHT: 15px;
FONT-STYLE: normal;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
TEXT-DECORATION:underline;
.bluelnk {
FONT-SIZE: 9px;
COLOR: blue;
LINE-HEIGHT: 15px;
FONT-STYLE: normal;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
TEXT-DECORATION: none;
.bluelnk:hover{
FONT-SIZE: 9px;
COLOR: blue;
LINE-HEIGHT: 15px;
FONT-STYLE: normal;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
TEXT-DECORATION:underline;
.greenlnk {
FONT-SIZE: 9px;
COLOR: green;
LINE-HEIGHT: 15px;
FONT-STYLE: normal;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
TEXT-DECORATION: none;
.greenlnk:hover{
FONT-SIZE: 9px;
COLOR: green;
LINE-HEIGHT: 15px;
FONT-STYLE: normal;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
TEXT-DECORATION:underline;
</style>
</HEAD>
<BODY topmargin="0" leftmargin="0" rightmargin="0" >
<a class="redlnk" href="red.htm"
title="red">Red</a>
<br/>
<a class="bluelnk" href="blue.htm"
title="blue">Blue</a>
<br/>
<a class="greenlnk" href="green.htm"
title="green">Green</a>
</BODY>
</HTML>
I hope this helps.
shanthi

Similar Messages

  • Cannot create link in report region!

    Hello Everyone,
    I have developed a region in Page 0 which holds the page items of a JQuery Dialog Box and javascript fuctions( dispAudit_p(), dispAudit_r()) to pass value between the page and the dialog box.
    Now! In my actual page i have a master detail page regions.
    I created a button in the master region which calls the dispAudit_p() function and works perfectly.
    In the detail region i modified the query to have a dummy column - i want this field as a link or an image which calls the function dispAudit_r().
    I tried the display element as Text Field for the dummy column and in the Element Attribute i called the js using onfocus, it just worked fine.
    But when i tried link column option it shows the dialog box but the values are "undefined".
    Please let me know hoe to solve this. The following is the JavaScript:
    <script type="text/javascript">
    $( function() { 
    $('#ModalForm').dialog(
    modal : true ,
    autoOpen : false ,
    buttons : { 
    Close : function() { 
    closeForm();
    function dispAudit_p (formItem1,formItem2,formItem3,formItem4)
    $('#ModalForm').dialog('open');
         document.getElementById("P0_CREATEDBY").value = document.getElementById(formItem1).value;
    document.getElementById("P0_CREATEDBY").disabled = 'true';
         document.getElementById("P0_CREATIONDATE").value = document.getElementById(formItem2).value;
    document.getElementById("P0_CREATIONDATE").disabled = 'true';
         document.getElementById("P0_LASTUPDATEDBY").value = document.getElementById(formItem3).value;
    document.getElementById("P0_LASTUPDATEDBY").disabled = 'true';
         document.getElementById("P0_LASTUPDATEDDATE").value = document.getElementById(formItem4).value;
    document.getElementById("P0_LASTUPDATEDDATE").disabled = 'true';
    function dispAudit_r(formItem1,formItem2,formItem3,formItem4,pThis)
    $('#ModalForm').dialog('open');
    var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
    document.getElementById("P0_CREATEDBY").value = html_GetElement(formItem1+'_'+vRow).value;
    document.getElementById("P0_CREATIONDATE").value = html_GetElement(formItem2+'_'+vRow).value;
    document.getElementById("P0_LASTUPDATEDBY").value = html_GetElement(formItem3+'_'+vRow).value;
    document.getElementById("P0_LASTUPDATEDDATE").value= html_GetElement(formItem4+'_'+vRow).value;
    function closeForm()
    $('#ModalForm input[type="text"]').val('');
    $('#ModalForm').dialog('close');
    </script>
    Edited by: John on Oct 17, 2011 3:26 PM
    Edited by: John on Oct 17, 2011 4:33 PM

    Where can i find button classIn the button template
    Usually(depend's on the theme) redirect buttons template are link tags with some class that styles them like a button. Else you can create such a button template(by copying it from another theme) without any styling
    For example a button template like
    &lt;a #BUTTON_ATTRIBUTES# class=&quot;&quot; href=&quot;#LINK#&quot;&gt;#LABEL#&lt;/a&gt;would render the button like a plain link

  • How to hand-code a repeat region? (ASP/VBScript)  WorldPay workaround.

    Hi,
    So far I've been using the standard Dreamweaver Repeat Region
    behaviour to
    add a database repeat region to my page. However, the code
    this produces
    doesn't work with WorldPay's callback script and I need to
    know if it's
    possible to hand code a repeat region. My repeat region data
    includes
    images etc so, as well as creating/displaying the repeat
    region, I also need
    to know how to incorporate some basic HTML.
    Would appreciate any advice or links to a tutorial.
    Thanks
    nath.

    Hi Joe,
    I have database content on my WorldPay callback page, which
    is fed by a form
    variable sent back from WorldPay. I can therefore call up
    order details, in
    my database, by ID.
    Anyway, I have two recordsets displaying correctly on my
    callback page;
    Order Summary and Order Items. Because a customer may
    purchase more than
    one item, I need to show all records in the Order Items table
    that match the
    order ID. I therefore need a repeat region for the Order
    Items recordset to
    show all products, so I've inserted the standard DW repeat
    region:
    <%
    Dim Repeat1__numRows
    Dim Repeat1__index
    Repeat1__numRows = -1
    Repeat1__index = 0
    rsItems_numRows = rsItems_numRows + Repeat1__numRows
    %>
    ...(above the head tag) and....
    <%
    While ((Repeat1__numRows <> 0) AND (NOT rsItems.EOF))
    %>
    ...Recordset Data...
    <%
    Repeat1__index=Repeat1__index+1
    Repeat1__numRows=Repeat1__numRows-1
    rsItems.MoveNext()
    Wend
    %>
    ...within my page where I want the repeat region to be.
    If I DON'T include this code, both recordsets display data,
    however the
    Order Items recordset only shows 1 item (obviously, because
    there is no
    repeat region). When I add the repeat region code, as above,
    WorldPay
    fails.
    WorldPay support can't actually tell you what's wrong, nor do
    you receive an
    error line or anything, however I know it's the repeat region
    because both
    recordsets display correctly WITHOUT the repeat region code.
    Any way around this? I really need this to work because
    otherwise I'm going
    to have to force a re-direct and an auto-submission of a form
    value
    (nasty!), in order to be able to display the customers order
    summary, and
    order items, on one page.
    Hope you can help. Thanks Joe.
    Regards
    Nath.
    "Joe Makowiec" <[email protected]> wrote in
    message
    news:[email protected]...
    > On 02 Jul 2007 in macromedia.dreamweaver.appdev,
    tradmusic.com wrote:
    >
    >> So far I've been using the standard Dreamweaver
    Repeat Region
    >> behaviour to add a database repeat region to my
    page. However, the
    >> code this produces doesn't work with WorldPay's
    callback script and
    >> I need to know if it's possible to hand code a
    repeat region. My
    >> repeat region data includes images etc so, as well
    as
    >> creating/displaying the repeat region, I also need
    to know how to
    >> incorporate some basic HTML.
    >
    > Before you go re-inventing the wheel, what doesn't work?
    >
    > --
    > Joe Makowiec
    >
    http://makowiec.net/
    > Email:
    http://makowiec.net/contact.php

  • Nested Repeat Region

    Dreamweaver CS3
    ASP / VBScript
    Hi,
    I'm trying to create a nested repeat region to display a list
    of categories
    and, in brackets afterwards, a count of the number of
    sub-categories
    contained in it E.g.
    Cats (12)
    Dogs (43)
    Fish (92)
    Etc
    I have managed to create my repeat region ok because as soon
    as I drop a
    field in from the recordset, it loops through them all and
    displays them
    correctly. However, when I try and simply write out the total
    number of
    records found, it doesn't display anything.
    Recordset 1 is a straighforward select from the table.
    Recordset 2 adds a
    WHERE clause usinga variable based on the 1st recordset. Here
    is the code
    i'm using for the 2 recordsets:
    Recordset 1 :
    <%
    Dim Level1
    Dim Level1_cmd
    Dim Level1_numRows
    Set Level1_cmd = Server.CreateObject ("ADODB.Command")
    Level1_cmd.ActiveConnection = MM_SemiDirectory_STRING
    Level1_cmd.CommandText = "SELECT * FROM TBL_Level1 ORDER BY
    [Description]
    ASC"
    Level1_cmd.Prepared = true
    Set Level1 = Level1_cmd.Execute
    Level1_numRows = 0
    %>
    Recordset 2 :
    <%
    Dim Level2__varLink
    Level2__varLink = "1"
    If (level1.fields.item("Level1_ID").value <> "") Then
    Level2__varLink = level1.fields.item("Level1_ID").value
    End If
    %>
    <%
    Dim Level2
    Dim Level2_cmd
    Dim Level2_numRows
    Set Level2_cmd = Server.CreateObject ("ADODB.Command")
    Level2_cmd.ActiveConnection = MM_SemiDirectory_STRING
    Level2_cmd.CommandText = "SELECT * FROM TBL_Level2 WHERE
    Level1_ID = ? ORDER
    BY Level1_ID ASC"
    Level2_cmd.Prepared = true
    Level2_cmd.Parameters.Append
    Level2_cmd.CreateParameter("param1", 5, 1, -1,
    Level2__varLink) ' adDouble
    Set Level2 = Level2_cmd.Execute
    Level2_numRows = 0
    %>
    Now for the repeated code :
    <%
    While ((Repeat1__numRows <> 0) AND (NOT Level1.EOF))
    %>
    <li><a
    href="category.asp?level1=<%=(Level1.Fields.Item("Level1_ID").Value)%>"><%=(Level1.Fields .Item("Description").Value)%>
    (<%=(Level2_total)%>)
    </li></a>
    <%
    Repeat1__index=Repeat1__index+1
    Repeat1__numRows=Repeat1__numRows-1
    Level1.MoveNext()
    Wend
    %>
    Can anyone tell me what I need to do to this code to make it
    display the
    number of sub-categories?
    Thanks!!!

    Ok folks,
    I found a way to get what I want. It's not pretty as I had to
    make an extra
    query in the database (that select of the count of all child
    table results
    for each parent category) and am pulling from that but it
    works and that's
    the main thing. I'm sure there is a more effective way of
    doing it but
    that's life!
    I'm still interested in knowing the 'proper' way (if there is
    such a thing)
    so if you have the time to show me, i'm all ears!
    Cheers!
    "Mintyman" <[email protected]> wrote in message
    news:[email protected]...
    > Ok,
    >
    > So I closed the <li> code before the <a>
    code. D'oh!
    >
    > Anyway, it returns a number now........the problem now
    is that it returns
    > the same value for each parent repeat!!!
    >
    > "Mintyman" <[email protected]> wrote in message
    > news:[email protected]...
    >> Dreamweaver CS3
    >> ASP / VBScript
    >>
    >> Hi,
    >>
    >> I'm trying to create a nested repeat region to
    display a list of
    >> categories and, in brackets afterwards, a count of
    the number of
    >> sub-categories contained in it E.g.
    >>
    >> Cats (12)
    >> Dogs (43)
    >> Fish (92)
    >> Etc
    >>
    >> I have managed to create my repeat region ok because
    as soon as I drop a
    >> field in from the recordset, it loops through them
    all and displays them
    >> correctly. However, when I try and simply write out
    the total number of
    >> records found, it doesn't display anything.
    >>
    >> Recordset 1 is a straighforward select from the
    table. Recordset 2 adds a
    >> WHERE clause usinga variable based on the 1st
    recordset. Here is the
    >> code i'm using for the 2 recordsets:
    >>
    >> Recordset 1 :
    >>
    >> <%
    >> Dim Level1
    >> Dim Level1_cmd
    >> Dim Level1_numRows
    >>
    >> Set Level1_cmd = Server.CreateObject
    ("ADODB.Command")
    >> Level1_cmd.ActiveConnection =
    MM_SemiDirectory_STRING
    >> Level1_cmd.CommandText = "SELECT * FROM TBL_Level1
    ORDER BY [Description]
    >> ASC"
    >> Level1_cmd.Prepared = true
    >>
    >> Set Level1 = Level1_cmd.Execute
    >> Level1_numRows = 0
    >> %>
    >>
    >> Recordset 2 :
    >>
    >> <%
    >> Dim Level2__varLink
    >> Level2__varLink = "1"
    >> If (level1.fields.item("Level1_ID").value <>
    "") Then
    >> Level2__varLink =
    level1.fields.item("Level1_ID").value
    >> End If
    >> %>
    >> <%
    >> Dim Level2
    >> Dim Level2_cmd
    >> Dim Level2_numRows
    >>
    >> Set Level2_cmd = Server.CreateObject
    ("ADODB.Command")
    >> Level2_cmd.ActiveConnection =
    MM_SemiDirectory_STRING
    >> Level2_cmd.CommandText = "SELECT * FROM TBL_Level2
    WHERE Level1_ID = ?
    >> ORDER BY Level1_ID ASC"
    >> Level2_cmd.Prepared = true
    >> Level2_cmd.Parameters.Append
    Level2_cmd.CreateParameter("param1", 5,
    >> 1, -1, Level2__varLink) ' adDouble
    >>
    >> Set Level2 = Level2_cmd.Execute
    >> Level2_numRows = 0
    >> %>
    >>
    >>
    >> Now for the repeated code :
    >>
    >>
    >> <%
    >> While ((Repeat1__numRows <> 0) AND (NOT
    Level1.EOF))
    >> %>
    >> <li><a
    >>
    href="category.asp?level1=<%=(Level1.Fields.Item("Level1_ID").Value)%>"><%=(Level1.Fields .Item("Description").Value)%>
    >> (<%=(Level2_total)%>)
    >> </li></a>
    >>
    >>
    >> <%
    >> Repeat1__index=Repeat1__index+1
    >> Repeat1__numRows=Repeat1__numRows-1
    >> Level1.MoveNext()
    >> Wend
    >> %>
    >>
    >> Can anyone tell me what I need to do to this code to
    make it display the
    >> number of sub-categories?
    >>
    >> Thanks!!!
    >>
    >>
    >>
    >
    >

  • Dreamweaver error on inserting an XSLT repeat region

    I am getting a Dreamweaver JavaScript error message when
    attempting to insert an XSLT Repeat Region under certain
    circumstances in Dreamweaver 8.0.2 for Windows. I have posted a
    full description on
    David
    Powers's friends of ED forum, but I wanted to report it here as
    well for confirmation.
    When creating a Repeat Region in an XSLT fragment, the
    following error message appears:
    While executing objetTag in XSLT_ForEach.htm, the following
    JavaScript error(s) occurred: At line 502 of the file "C:\Program
    Files\Macromedia\Dreamweaver
    8\Configuration\Objects\Server\serverObjectsCommon.js": Type Error:
    dwscripts.getBalancedSelection is not a function
    This error is entirely reproducible,
    but not if any PHP file has been open at any point since the
    XSLT fragment was opened.
    To illustrate:
    0) If Dreamweaver is running, exit completely.
    1) Start Dreamweaver.
    2) Create a new XSLT fragment, or open an existing one.
    3) In design view, place a field from an XML source into your
    fragment, select it, and then try to create an XSLT repeat region.
    The error message described above appears. Dismiss the error
    dialog, but keep the XSLT fragment document open.
    4) Create a new PHP document (or open an existing one), then
    close it.
    5) Back in your XSLT fragment, try again to create the repeat
    region. Now it works.
    If you open the PHP document
    before creating the XSLT fragment, you still get the error
    -- even if you leave the PHP document open. If you open the PHP
    document
    after you open the XSLT fragment, you do not get the error
    -- even if you close the PHP document before you create the XSLT
    repeat region.
    It looks like
    the key is to touch a PHP document at some point
    after the XSLT fragment is opened. So that is the
    workaround. My guess is that one of the included internal
    JavaScript scripts is not being sourced until a PHP document is
    opened, but this is probably not intended behavior.
    -jon

    quote:
    Originally posted by:
    Newsgroup User David Powers
    The only way that I know of is to disable all extensions,
    make sure that
    Dreamweaver is working correctly, and then enable extensions
    one by one
    until the error occurs again. You have then found the guilty
    party. You
    could also try it the other way round - disabling extensions
    one by one
    until it works OK. If you have recently installed a new
    extension, that
    may be the one to test first.
    Another thing you can try is this:
    You can try this to see if it solves your problem:
    Close Dreamweaver.
    Find C:\Documents and Settings\<username>\Application
    Data\Macromedia\Dreamweaver
    8\Configuration\WinFileCache-*.dat
    Delete the file (it's in a hidden folder, so you need to have
    enabled
    the option to see hidden files and folders).
    Restart DW. See if your problem has gone away.
    Thanks, David.
    Actually, what I was looking for was a way to trace what
    Dreamweaver is doing behind the scenes -- what scripts it is
    loading, and what errors those scripts throw. I had already tried
    uninstalling all my extensions and deleting my entire user
    configuration directory (not just the WinFileCache file), to no
    avail. I also tried running the "Repair" program from the Studio
    installation, but the problem persisted.
    So I resorted to uninstalling and reinstalling Dreamweaver
    from scratch from the original Studio 8 CD.
    Amazingly, even before I applied the 8.0.2 (or 8.0.1) update or
    installed any hotfixes or extensions, the same error message
    appeared.
    Before reinstalling, I took care to delete my user
    configuration directory (actually, I deleted the entire
    C:\Documents and Settings\{Username}\Application
    Settings\Macromedia\Dreamweaver 8/ tree. I took care to
    uninstall Dreamweaver 8 completely using the uninstall program, and
    I confirmed that the
    C:\Program Files\Macromedia\Dreamweaver 8\ directory was
    gone before reinstalling. In the outside chance that there was a
    problem with my install CD itself, I even tried installing twice --
    once from the install-image Studio 8 CD I downloaded from the
    Macromedia Store after upgrading from MX 2004, and once from the
    official Studio 8 CD I ordered by mail afterwards.
    So it's not my installation, it's not the hotfix, and it's
    not any of the extensions I've installed. It's a bona-fide bug.
    (What I can't figure out is why David was not able to reproduce
    it.)
    Next?
    -jon

  • Horizontal Repeat Region

    How do I create a horizontal repeat region that drops to the
    next row when the width of the data exceeds the table width?
    Something like this:
    01 02 03 04 05
    06 07 08 09 10
    11 12 13 14 15
    Each would represent a thumbnail with a title under it

    AngryCloud wrote:
    > How do I create a horizontal repeat region that drops to
    the next row when the
    > width of the data exceeds the table width?
    Try the horizontal looper from www.tom-muck.com. The Adobe
    Dreamweaver
    Developer Toolbox (formerly Kollection) also has this
    feature.
    David Powers, Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • How to create a repeating region like the attachements in Gmail

    I don't even know how to begin Googling or searching here for
    this topic. But I've got a form and I want to have two fields show
    up for inputting the fabric type and then the pattern name. This
    site will allow them to request fabric swatches to see in person
    how they look and make a decision for their furniture. And if
    customers want to ask for more than one sample, I want to be able
    to have a link that says, "Request another" and when clicked, it
    creates another instance of those two fields automagically, just
    how the attachments in Gmail work.
    Is this something possible with Spry? I'd like to think it
    is, but it might need some jury rigging to ensure that the ids for
    those text inputs are all unique and such. But like I said, I don't
    even know how to begin searching for this topic since "repeating
    area" or "repeating region" brings back 1000s of unrelating
    results.
    Anyone have any experience doing something like this and
    could shed some light on it and/or point me toward some resources
    that could help out?
    Thanks!

    Hi unnamed,
    Suppose you have an id that identifies your record.
    Go to Report definiton, tab report attirbutes.
    Select the id of your record.
    Create a link to the page you want to go to.
    Hope this helps.
    If not, I suggest you to create a from with report, and analyze the way the wizard has generated it.
    Leo

  • Create Word Doc from list with multiple items (repeat region)

    I have a document library that creates an invoice document based on another list. The list has multiple items that where purchased and need to appear on the invoice. It is only showing the first purchase item and not the others. How do I get all the items
    to display (repeating region)?
    Example:
    Invoice #
    Salesperson
    Items Purchased
    item 1
    item 2
    etc...
    Thanks!

    I've tried these examples but it only grabs the first item and places it in the word document. I need it to grab all the items.
    Example:
    Invoice #
    Salesperson
    Items Purchased
    item 1
    item 2
    etc...

  • Creating DW templates - Repeating Optional Region?

    Hello Again:
    I know that it isn't always the best to pose abstract questions on forums, but I am wondering if anyone can tell if/how one can create an optional region within a repeating region of a DW template?
    The specific conundrum I seem to face that if a region has two divs within it (one with and one without a textbox surrounding it, for example) and if the user of the template chooses to repeat the section, how can they delete the second div within the repeated region (deleting through the modify tempate option) without deleting all the previous instances of the div as well.
    If there is a way to do this, I would appreciate some guidance.
    Thanks in advance.
    Steve Webster.

    Yes, and first my apologies, as I could have provided the example first of all.  If you go to  http://socls.org/testing/immigration-refugee_law.html I can perhaps explain my objective better.  On that page you see a series of text boxes one with a gradient background and a second with a only a outline in red.   For the moment ignore the text boxes that are rendered side by side and assume that the 1st two horizontal text boxes are all that I want to repeat throughout the page.
    I want to place the two of those full width text boxes within a repeating region (or turn them into a repeating region).  However if the webmaster needs to add content but doesn't need a pair of text boxes, or otherwise gets to the end of her content sections and doesn't need a final red outlined box, then I would want that the last red outlined box to be optional, without however deleting previous instances.  Sometimes content can't be organized so neatly as to finish with an even number of "content sets".
    I think the bigger problem is, as I understand it, that you can't create two "divs" (in this case text boxes) and have each repeating independently, and allow each to be moved up and down as though they were passing through another text box/div that also constitutes a repeating region.  The only way to have the pattern to repeat is to "pair" them as a single unit (Or perhaps I have misunderstood how the repeating action works ?!?)  I have tried treating them as independent repeating regions and it doesn't seem to work in the manner I would like.  If you tie them together in this way, then the only way to end with an uneven number of text boxes is to make one optional.  But it seems that if you make the second in the pair optional, then by "turning it off", you end up turning all off.
    At least that is how it seems to work.
    You may be right that the design is too complicated to work as a template in this fashion.
    Or, perhaps I am fundamentally mistaken on the architecture of the repeat concept.
    Thanks again for your patience and persistence
    Steve.

  • Help with Spry Rating Widget within a Spry Repeating Region

    My link  http://www.youthinkyougotitbad.com
    This is a long question, but it seems to me if answered somewhere it could help alot of people in the spry community creating comment boards as it uses three important spry widgets: rating, repeating, and tabbed panels. I am trying to use spry rating widget within a spry repeating region within a spry tabbed panel with xml. I was trying to go with the pulse light script (http://forums.adobe.com/message/3831721#3831721) but Gramps told me about the spry rating widget. But I have ran into a couple more problems. First, I couldnt find that much information on the forums or online about how to do the php page with the spry rating widget. None of these have any information on how to do it:
    http://labs.adobe.com/technologies/spry/articles/rating_overview/index .html
    http://labs.adobe.com/technologies/spry/articles/data_api/apis/rating. html
    http://labs.adobe.com/technologies/spry/samples/rating/RatingSample.ht ml
    And it seems that the official examples are so poor (or I am just ignorant, which def could be a possiblity) it shows
    to set the initial rating value from the server, but uses a static value of 4
    http://labs.adobe.com/technologies/spry/samples/rating/RatingSample.html
    <span id="initialValue_dynamic" class="ratingContainer">
             <span class="ratingButton"></span>
             <span class="ratingButton"></span>
             <span class="ratingButton"></span>
             <span class="ratingButton"></span>
             <span class="ratingButton"></span>      
             <input id="spryrating1_val" type="text" name="spryrating1" value="4" readonly="readonly" />
             <span class="ratingRatedMsg sample">Thanks for your rating!</span>
    </span>
    <script>
    var initialValue_dynamic = new Spry.Widget.Rating("initialValue_dynamic", {ratingValueElement:'spryrating1_val'});
    </script>
    I finally found a site that has the php and mysql setup.
    http://www.pixelplant.ro/en/articles/article-detail/article/adobe-widgets-for-download.htm l
    But its not perfect. It has the same problem that I ran into with Pulse light, that you had to use php echo within the spry repeating region to set the initial value from the server:
    <span id="spryrating1" class="ratingContainer">
             <span class="ratingButton"></span>
                <input type="text" id="ratingValue" name="dynamic_rate" value="<?php echo $row['average']?>"/>
            </span>
            <script type="text/javascript"
                var rating1 = new Spry.Widget.Rating("spryrating1", {ratingValueElement:'ratingValue', afterRating:'serverValue', saveUrl: 'save.php?id=spryrating1&val=@@ratingValue@@'});
            </script>
    So instead, I tried with three of my panels (www.youthinkyougotitbad.com) to get the average rating from xml by using the following queries:
    Recent
    Returns the blurts in most recent order along with average rating
    SELECT Blurt.Id_blurt, Blurt.Name, Blurt.Location, Blurt.Blurt,Blurt.`Date`,DATE_FORMAT(Blurt.`Date`, '%l:%i %p on %M %D, %Y') as Date, ratings.rating_id, Avg(ratings.rating_value) as average_r FROM ratings Left Join Blurt On ratings.rating_id = Blurt.Id_blurt Group By Id_blurt ORDER BY Blurt.`Date` DESC
    Wet Eyed
    Returns the blurts in highest ratings order along with the average rating
    SELECT Blurt.Id_blurt, Blurt.Name, Blurt.Location, Blurt.Blurt, DATE_FORMAT(Blurt.`Date`, '%l:%i %p on %M %D, %Y') as Date, ratings.rating_id, Avg(ratings.rating_value) as average_r FROM ratings Left Join Blurt On ratings.rating_id = Blurt.Id_blurt AND ratings.rating_value > 0.1 Group By Id_blurt ORDER BY average_r Desc
    Dry Eyed
    Returns the blurts in lowest rating order along with the average rating
    SELECT Blurt.Id_blurt, Blurt.Name, Blurt.Location, Blurt.Blurt, DATE_FORMAT(Blurt.`Date`, '%l:%i %p on %M %D, %Y') as Date, ratings.rating_id, Avg(ratings.rating_value) as average_r FROM ratings Left Join Blurt On ratings.rating_id = Blurt.Id_blurt AND ratings.rating_value > 0.1 Group By Id_blurt ORDER BY average_r
    These all return the correct xml in the correct order.And they return the average rating of each blurt which I can send to my page with xml.
    My first question is that I dont know how to configure the query on my fourth panel Empathized & Advised the same way because it already has a Group By for the Comment Id.
    SELECT `Comment`.id_Blurt, COUNT(*) as frequency, Blurt.Id_blurt, Blurt.Name, Blurt.Location, Blurt.Blurt, DATE_FORMAT(Blurt.`Date`, '%l:%i %p on %M %D, %Y') as Date FROM Blurt, `Comment` WHERE Blurt.Id_blurt = `Comment`.id_Blurt GROUP BY `Comment`.id_Blurt ORDER BY COUNT(*) DESC";
    Not sure if you guys need more information to understand that all, if so just ask.
    So after I get my average value through xml to the first three panels, I set my spry repeating region up like this:
    (Blurt panel)
    <div spry:region="pv1" spry:repeatchildren="pv1">           
               <div class="blurtbox">
                <!--  most recent blurt tab-->
                <h3> "{pv1::Blurt}"</h3>
                <p> Blurted from {pv1::Location} at {pv1::Date}</p>
                <p>Empathize or Advise about {pv1::Name}'s Blurt #<a href="detailblurt.php?blurtid={pv1::Id_blurt}"> {pv1::Id_blurt}</a></a></p>
               <span id="{pv1::Id_blurt}" class="ratingContainer">
                <span class="ratingButton"></span>
                <span class="ratingButton"></span>
                <span class="ratingButton"></span>
                <span class="ratingButton"></span>
                <span class="ratingButton"></span>
                <span class="ratingRatedMsg">Thank You! Your tears have been tallied.</span>
                <input type="text" id="ratingValue" name="dynamic_rate" value="{pv1::average_r}"/>
            </span>
            <script type="text/javascript">
                // overview of available options and their values:
                // http://labs.adobe.com/technologies/spry/articles/rating_overview/index.html
                var rating1 = new Spry.Widget.Rating("{pv1::Id_blurt}", {ratingValueElement:'ratingValue', afterRating:'serverValue', saveUrl: 'save.php?id={pv1::Id_blurt}&val=@@ratingValue@@'});
            </script>
                 <br/>
               </div>
              </div>
    Ok, it registers the right vote in the database with the right blurt id each time. But I am having two problems so far:
    One, even though {pv1::average_r} returns the correct average through xml, it doesn't show the initial rating value for each of the repeating blurts. It seems to show the first one correct, and then just repeat that same value to the other ones that follow. I just dont understand since it can get the correct server value right after you vote (afterRating:'serverValue), that I can't manipulate spryrating.js in some way that I could just replace 'ratingValue' in ratingValueElement:'ratingValue' with something to give me the initial server value.
    Two: Is even more mysterious to me, if you play around with voting on the site, sometimes you are unable to vote on different blurts. Its weird. It seems like that the javascript is completely off just on those blurts. And sometimes its a whole row, sometimes none. But so far its never a problem on the first tabbed panel (Recent), only on the other three. As far as I know, the coding is exactly the same in each tab's repeating region except for the different xml input.
    And, now on the live server, sometimes the pics of tears used to voting dont show up until you click.
    Any help on those three questions (how to query the fourth panel, how to show the initial server value, and the glitches with voting) would be greatly appreciated!! I looked pretty hard on adobe forums and other sites, and didnt see much on how to really use the spry rating widget with php and xml.
    Thanks!!

    Update:
    Ok, the first query on the Recent tab doesnt work for me because it wont show unless its already voted, and since these are supposed to be new blurts, that kind of breaks the whole site:
    "SELECT Blurt.Id_blurt, Blurt.Name, Blurt.Location, Blurt.Blurt,Blurt.`Date`,DATE_FORMAT(Blurt.`Date`, '%l:%i %p on %M %D, %Y') as Date, ratings.rating_id, Avg(ratings.rating_value) as average_r FROM ratings Left Join Blurt On ratings.rating_id = Blurt.Id_blurt Group By Id_blurt ORDER BY Blurt.`Date` DESC";
    So I replaced it with what I originally had.
    "SELECT Blurt.Id_blurt, Blurt.Name, Blurt.Location, Blurt.Blurt,Blurt.`Date`,DATE_FORMAT(Blurt.`Date`, '%l:%i %p on %M %D, %Y') as Date FROM Blurt ORDER BY Blurt.`Date` DESC";
    But this doesn't provide me with the initial average rating:(

  • Tabbed panels repeat region in cms displays 2nd item as a block of content

    Hi everyone, hope someone can help:
    I have a test page live
    http://aegmotorhomes.co.uk/usedtest1.php
    Problem is this-
    I have added a repeat region on my dreamweaver template
    I use Perch CMS as my management for staff to add new items for sale on this page
    I have built a tabbed panels to list the item
    On my CMS it allows me to press "add another" which then adds the tabbed panels again as a new item and the staff input the details
    My problem is the first item works perfect and all tabbs work fine, each item after that doesn't have tabbs and shows all content as one whole block
    I think it is to do with the ID and applies the java file only to item one, thats my guess.
    I have attached code below for my tabbed panels template, .js file and .css file - can anyone shed any light on this issue"
    TEMPLATE
    <style type="text/css">
    #container1 {
              width: 700px;
              background-color: #E6E6E6;
              border: .1em solid #999;
              padding-top: 5px;
              padding-right: 5px;
              padding-left: 5px;
              height: auto;
              margin-bottom: 30px;
    #item_description {
              font-family: Arial, Helvetica, sans-serif;
              font-size: 1.3em;
              color: #333;
              background-color: #FFF;
              height: 30px;
              border-bottom-width: .1em;
              border-bottom-style: dotted;
              border-bottom-color: #333;
              font-weight: bold;
              margin-bottom: 10px;
    #price {
              margin-top: 5px;
              float: right;
              width: 150px;
              background-color: #EAEAEA;
              border: 0.1em solid #CCC;
    .BOLDTEXT {
              font-weight: bold;
              text-align: center;
              color: #FFF;
    .BOLDTEXT_PRICE {
              color: #333;
    #engine_spec {
              float: left;
              width: 190px;
              font-family: Arial, Helvetica, sans-serif;
              font-size: .75em;
              border-top-style: none;
              border-right-style: none;
              border-bottom-style: none;
              border-left-style: none;
    #top_price {
              font-family: Arial, Helvetica, sans-serif;
              font-size: 1.2em;
              color: #099;
              float: right;
              width: 150px;
              font-weight: bold;
              text-align: right;
    #top_price {
              font-family: Arial, Helvetica, sans-serif;
              font-size: 1.4em;
              color: #099;
    #overview_picture {
              height: 150px;
              width: 200px;
              background-color: #CCC;
              float: left;
              margin-right: 10px;
              margin-top: 5px;
    .BOLDTEXT_blackprice {
              font-family: Arial, Helvetica, sans-serif;
              font-size: 1.4em;
              color: #099;
    #smallprint {
              font-family: Arial, Helvetica, sans-serif;
              font-size: .5em;
              color: #666;
              margin-top: 2px;
    table tr td {
              font-size: 0.75em;
              font-family: Arial, Helvetica, sans-serif;
    .specwhite {
              color: #FFF;
              font-family: Arial, Helvetica, sans-serif;
              font-size: 1em;
              font-weight: bold;
    #reserve {
              font-family: Arial, Helvetica, sans-serif;
              font-size: 1.2em;
              font-weight: bold;
              color: #FFF;
              background-color: #099;
              width: 140px;
              float: right;
              margin-top: 10px;
              padding: 5px;
              text-align: center;
              border: .1em solid #999;
    </style>
    <script src="../../../../SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
    <link href="../../../../SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
    <div id="container1">
      <div id="TabbedPanels1" class="TabbedPanels">
        <ul class="TabbedPanelsTabGroup">
          <li class="TabbedPanelsTab" tabindex="0">Overview</li>
          <li class="TabbedPanelsTab" tabindex="0">Description</li>
          <li class="TabbedPanelsTab" tabindex="0">Images</li>
          <li class="TabbedPanelsTab" tabindex="0">Specification</li>
        </ul>
        <div class="TabbedPanelsContentGroup">
          <div class="TabbedPanelsContent">
            <div id="item_description"><perch:content id="Title1" label="Title" type="text" />
              <div id="top_price">£<perch:content id="Title2" label="Top Price" type="text" /></div>
            </div>
            <div id="overview_picture"><img src="<perch:content id="photo" label="Photo" type="image" />" class="photo" /></div>
            <div class="engine_spec" id="engine_spec">
              <table width="100%" border="0" cellpadding="5" cellspacing="7">
                <tr>
                  <td width="35%" bgcolor="#EAEAEA">Year of Make</td>
                  <td width="65%" bgcolor="#999999"><strong class="spec_white"><span class="engine_spec"><span class="specwhite"><perch:content id="Title3" label="Year" type="text" /></span></span></strong></td>
                </tr>
                <tr>
                  <td bgcolor="#EAEAEA">Current Miles</td>
                  <td bgcolor="#999999" class="spec_white"><span class="specwhite"><perch:content id="Title4" label="Mileage" type="text" /></span></td>
                </tr>
                <tr>
                  <td bgcolor="#EAEAEA">Engine Size</td>
                  <td bgcolor="#999999" class="spec_white"><span class="specwhite"><perch:content id="Title5" label="Engine" type="text" /></span></td>
                </tr>
                <tr>
                  <td bgcolor="#EAEAEA">Body Colour</td>
                  <td bgcolor="#999999" class="spec_white"><span class="specwhite"><perch:content id="Title6" label="Colour" type="text" /></span></td>
                </tr>
                <tr>
                  <td bgcolor="#EAEAEA">Transmission</td>
                  <td bgcolor="#999999" class="spec_white"><span class="specwhite"><perch:content id="Title7" label="Transmission" type="text" /></span></td>
                </tr>
              </table>
            </div>
            <div id="price">
              <table width="150" border="0" cellspacing="9">
                <tr>
                  <td width="50" height="25" bgcolor="#999999" class="BOLDTEXT">WAS</td>
                  <td width="81" class="BOLDTEXT"><span class="BOLDTEXT_blackprice">£<perch:content id="Title8" label="Old Price" type="text" /></span></td>
                </tr>
                <tr>
                  <td height="25" bgcolor="#999999" class="BOLDTEXT">NOW</td>
                  <td class="BOLDTEXT"><span class="BOLDTEXT_blackprice">£<perch:content id="Title9" label="New Price" type="text" /></span></td>
                </tr>
                <tr>
                  <td height="25" bgcolor="#999999" class="BOLDTEXT">SAVE</td>
                  <td class="BOLDTEXT"><span class="BOLDTEXT_blackprice">£<perch:content id="Title9a" label="Save" type="text" /></span></td>
                </tr>
              </table>
            </div>
            <div id="reserve">Reserve Motorhome</div>
          </div>
          <div class="TabbedPanelsContent"><perch:content id="Text" label="Description" type="textarea" editor="ckeditor" html="true" /></div>
          <div class="TabbedPanelsContent"><table width="650" cellspacing="5">
      <tr>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
      </tr>
      <tr>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
      </tr>
      <tr>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
      </tr>
      <tr>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
      </tr>
      <tr>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
        <td width="106" height="80" bgcolor="#CCCCCC"> </td>
      </tr>
    </table></div>
          <div class="TabbedPanelsContent"><perch:content id="Text1" label="Specification" type="textarea" editor="ckeditor" html="true" /></div>
        </div>
      </div>
    </div>
    <script type="text/javascript">
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
    </script>
    .JS file
    (function() { // BeginSpryComponent
    if (typeof Spry == "undefined") window.Spry = {}; if (!Spry.Widget) Spry.Widget = {};
    Spry.Widget.TabbedPanels = function(element, opts)
              this.element = this.getElement(element);
              this.defaultTab = 0; // Show the first panel by default.
              this.tabSelectedClass = "TabbedPanelsTabSelected";
              this.tabHoverClass = "TabbedPanelsTabHover";
              this.tabFocusedClass = "TabbedPanelsTabFocused";
              this.panelVisibleClass = "TabbedPanelsContentVisible";
              this.focusElement = null;
              this.hasFocus = false;
              this.currentTabIndex = 0;
              this.enableKeyboardNavigation = true;
              this.nextPanelKeyCode = Spry.Widget.TabbedPanels.KEY_RIGHT;
              this.previousPanelKeyCode = Spry.Widget.TabbedPanels.KEY_LEFT;
              Spry.Widget.TabbedPanels.setOptions(this, opts);
              // If the defaultTab is expressed as a number/index, convert
              // it to an element.
              if (typeof (this.defaultTab) == "number")
                        if (this.defaultTab < 0)
                                  this.defaultTab = 0;
                        else
                                  var count = this.getTabbedPanelCount();
                                  if (this.defaultTab >= count)
                                            this.defaultTab = (count > 1) ? (count - 1) : 0;
                        this.defaultTab = this.getTabs()[this.defaultTab];
              // The defaultTab property is supposed to be the tab element for the tab content
              // to show by default. The caller is allowed to pass in the element itself or the
              // element's id, so we need to convert the current value to an element if necessary.
              if (this.defaultTab)
                        this.defaultTab = this.getElement(this.defaultTab);
              this.attachBehaviors();
    Spry.Widget.TabbedPanels.prototype.getElement = function(ele)
              if (ele && typeof ele == "string")
                        return document.getElementById(ele);
              return ele;
    Spry.Widget.TabbedPanels.prototype.getElementChildren = function(element)
              var children = [];
              var child = element.firstChild;
              while (child)
                        if (child.nodeType == 1 /* Node.ELEMENT_NODE */)
                                  children.push(child);
                        child = child.nextSibling;
              return children;
    Spry.Widget.TabbedPanels.prototype.addClassName = function(ele, className)
              if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) != -1))
                        return;
              ele.className += (ele.className ? " " : "") + className;
    Spry.Widget.TabbedPanels.prototype.removeClassName = function(ele, className)
              if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) == -1))
                        return;
              ele.className = ele.className.replace(new RegExp("\\s*\\b" + className + "\\b", "g"), "");
    Spry.Widget.TabbedPanels.setOptions = function(obj, optionsObj, ignoreUndefinedProps)
              if (!optionsObj)
                        return;
              for (var optionName in optionsObj)
                        if (ignoreUndefinedProps && optionsObj[optionName] == undefined)
                                  continue;
                        obj[optionName] = optionsObj[optionName];
    Spry.Widget.TabbedPanels.prototype.getTabGroup = function()
              if (this.element)
                        var children = this.getElementChildren(this.element);
                        if (children.length)
                                  return children[0];
              return null;
    Spry.Widget.TabbedPanels.prototype.getTabs = function()
              var tabs = [];
              var tg = this.getTabGroup();
              if (tg)
                        tabs = this.getElementChildren(tg);
              return tabs;
    Spry.Widget.TabbedPanels.prototype.getContentPanelGroup = function()
              if (this.element)
                        var children = this.getElementChildren(this.element);
                        if (children.length > 1)
                                  return children[1];
              return null;
    Spry.Widget.TabbedPanels.prototype.getContentPanels = function()
              var panels = [];
              var pg = this.getContentPanelGroup();
              if (pg)
                        panels = this.getElementChildren(pg);
              return panels;
    Spry.Widget.TabbedPanels.prototype.getIndex = function(ele, arr)
              ele = this.getElement(ele);
              if (ele && arr && arr.length)
                        for (var i = 0; i < arr.length; i++)
                                  if (ele == arr[i])
                                            return i;
              return -1;
    Spry.Widget.TabbedPanels.prototype.getTabIndex = function(ele)
              var i = this.getIndex(ele, this.getTabs());
              if (i < 0)
                        i = this.getIndex(ele, this.getContentPanels());
              return i;
    Spry.Widget.TabbedPanels.prototype.getCurrentTabIndex = function()
              return this.currentTabIndex;
    Spry.Widget.TabbedPanels.prototype.getTabbedPanelCount = function(ele)
              return Math.min(this.getTabs().length, this.getContentPanels().length);
    Spry.Widget.TabbedPanels.addEventListener = function(element, eventType, handler, capture)
              try
                        if (element.addEventListener)
                                  element.addEventListener(eventType, handler, capture);
                        else if (element.attachEvent)
                                  element.attachEvent("on" + eventType, handler);
              catch (e) {}
    Spry.Widget.TabbedPanels.prototype.cancelEvent = function(e)
              if (e.preventDefault) e.preventDefault();
              else e.returnValue = false;
              if (e.stopPropagation) e.stopPropagation();
              else e.cancelBubble = true;
              return false;
    Spry.Widget.TabbedPanels.prototype.onTabClick = function(e, tab)
              this.showPanel(tab);
              return this.cancelEvent(e);
    Spry.Widget.TabbedPanels.prototype.onTabMouseOver = function(e, tab)
              this.addClassName(tab, this.tabHoverClass);
              return false;
    Spry.Widget.TabbedPanels.prototype.onTabMouseOut = function(e, tab)
              this.removeClassName(tab, this.tabHoverClass);
              return false;
    Spry.Widget.TabbedPanels.prototype.onTabFocus = function(e, tab)
              this.hasFocus = true;
              this.addClassName(tab, this.tabFocusedClass);
              return false;
    Spry.Widget.TabbedPanels.prototype.onTabBlur = function(e, tab)
              this.hasFocus = false;
              this.removeClassName(tab, this.tabFocusedClass);
              return false;
    Spry.Widget.TabbedPanels.KEY_UP = 38;
    Spry.Widget.TabbedPanels.KEY_DOWN = 40;
    Spry.Widget.TabbedPanels.KEY_LEFT = 37;
    Spry.Widget.TabbedPanels.KEY_RIGHT = 39;
    Spry.Widget.TabbedPanels.prototype.onTabKeyDown = function(e, tab)
              var key = e.keyCode;
              if (!this.hasFocus || (key != this.previousPanelKeyCode && key != this.nextPanelKeyCode))
                        return true;
              var tabs = this.getTabs();
              for (var i =0; i < tabs.length; i++)
                        if (tabs[i] == tab)
                                  var el = false;
                                  if (key == this.previousPanelKeyCode && i > 0)
                                            el = tabs[i-1];
                                  else if (key == this.nextPanelKeyCode && i < tabs.length-1)
                                            el = tabs[i+1];
                                  if (el)
                                            this.showPanel(el);
                                            el.focus();
                                            break;
              return this.cancelEvent(e);
    Spry.Widget.TabbedPanels.prototype.preorderTraversal = function(root, func)
              var stopTraversal = false;
              if (root)
                        stopTraversal = func(root);
                        if (root.hasChildNodes())
                                  var child = root.firstChild;
                                  while (!stopTraversal && child)
                                            stopTraversal = this.preorderTraversal(child, func);
                                            try { child = child.nextSibling; } catch (e) { child = null; }
              return stopTraversal;
    Spry.Widget.TabbedPanels.prototype.addPanelEventListeners = function(tab, panel)
              var self = this;
              Spry.Widget.TabbedPanels.addEventListener(tab, "click", function(e) { return self.onTabClick(e, tab); }, false);
              Spry.Widget.TabbedPanels.addEventListener(tab, "mouseover", function(e) { return self.onTabMouseOver(e, tab); }, false);
              Spry.Widget.TabbedPanels.addEventListener(tab, "mouseout", function(e) { return self.onTabMouseOut(e, tab); }, false);
              if (this.enableKeyboardNavigation)
                        // XXX: IE doesn't allow the setting of tabindex dynamically. This means we can't
                        // rely on adding the tabindex attribute if it is missing to enable keyboard navigation
                        // by default.
                        // Find the first element within the tab container that has a tabindex or the first
                        // anchor tag.
                        var tabIndexEle = null;
                        var tabAnchorEle = null;
                        this.preorderTraversal(tab, function(node) {
                                  if (node.nodeType == 1 /* NODE.ELEMENT_NODE */)
                                            var tabIndexAttr = tab.attributes.getNamedItem("tabindex");
                                            if (tabIndexAttr)
                                                      tabIndexEle = node;
                                                      return true;
                                            if (!tabAnchorEle && node.nodeName.toLowerCase() == "a")
                                                      tabAnchorEle = node;
                                  return false;
                        if (tabIndexEle)
                                  this.focusElement = tabIndexEle;
                        else if (tabAnchorEle)
                                  this.focusElement = tabAnchorEle;
                        if (this.focusElement)
                                  Spry.Widget.TabbedPanels.addEventListener(this.focusElement, "focus", function(e) { return self.onTabFocus(e, tab); }, false);
                                  Spry.Widget.TabbedPanels.addEventListener(this.focusElement, "blur", function(e) { return self.onTabBlur(e, tab); }, false);
                                  Spry.Widget.TabbedPanels.addEventListener(this.focusElement, "keydown", function(e) { return self.onTabKeyDown(e, tab); }, false);
    Spry.Widget.TabbedPanels.prototype.showPanel = function(elementOrIndex)
              var tpIndex = -1;
              if (typeof elementOrIndex == "number")
                        tpIndex = elementOrIndex;
              else // Must be the element for the tab or content panel.
                        tpIndex = this.getTabIndex(elementOrIndex);
              if (!tpIndex < 0 || tpIndex >= this.getTabbedPanelCount())
                        return;
              var tabs = this.getTabs();
              var panels = this.getContentPanels();
              var numTabbedPanels = Math.max(tabs.length, panels.length);
              for (var i = 0; i < numTabbedPanels; i++)
                        if (i != tpIndex)
                                  if (tabs[i])
                                            this.removeClassName(tabs[i], this.tabSelectedClass);
                                  if (panels[i])
                                            this.removeClassName(panels[i], this.panelVisibleClass);
                                            panels[i].style.display = "none";
              this.addClassName(tabs[tpIndex], this.tabSelectedClass);
              this.addClassName(panels[tpIndex], this.panelVisibleClass);
              panels[tpIndex].style.display = "block";
              this.currentTabIndex = tpIndex;
    Spry.Widget.TabbedPanels.prototype.attachBehaviors = function(element)
              var tabs = this.getTabs();
              var panels = this.getContentPanels();
              var panelCount = this.getTabbedPanelCount();
              for (var i = 0; i < panelCount; i++)
                        this.addPanelEventListeners(tabs[i], panels[i]);
              this.showPanel(this.defaultTab);
    })(); // EndSpryComponent
    >CSS file
    @charset "UTF-8";
    /* SpryTabbedPanels.css - version 0.6 - Spry Pre-Release 1.6.1 */
    /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
    /* Horizontal Tabbed Panels
    * The default style for a TabbedPanels widget places all tab buttons
    * (left aligned) above the content panel.
    /* This is the selector for the main TabbedPanels container. For our
    * default style, this container does not contribute anything visually,
    * but it is floated left to make sure that any floating or clearing done
    * with any of its child elements are contained completely within the
    * TabbedPanels container, to minimize any impact or undesireable
    * interaction with other floated elements on the page that may be used
    * for layout.
    * If you want to constrain the width of the TabbedPanels widget, set a
    * width on the TabbedPanels container. By default, the TabbedPanels widget
    * expands horizontally to fill up available space.
    * The name of the class ("TabbedPanels") used in this selector is not
    * necessary to make the widget function. You can use any class name you
    * want to style the TabbedPanels container.
    .TabbedPanels {
              overflow: hidden;
              margin: 0px;
              padding: 0px;
              clear: none;
              width: 100%; /* IE Hack to force proper layout when preceded by a paragraph. (hasLayout Bug)*/
    /* This is the selector for the TabGroup. The TabGroup container houses
    * all of the tab buttons for each tabbed panel in the widget. This container
    * does not contribute anything visually to the look of the widget for our
    * default style.
    * The name of the class ("TabbedPanelsTabGroup") used in this selector is not
    * necessary to make the widget function. You can use any class name you
    * want to style the TabGroup container.
    .TabbedPanelsTabGroup {
              margin: 0px;
              padding: 0px;
    /* This is the selector for the TabbedPanelsTab. This container houses
    * the title for the panel. This is also the tab "button" that the user clicks
    * on to activate the corresponding content panel so that it appears on top
    * of the other tabbed panels contained in the widget.
    * For our default style, each tab is positioned relatively 1 pixel down from
    * where it wold normally render. This allows each tab to overlap the content
    * panel that renders below it. Each tab is rendered with a 1 pixel bottom
    * border that has a color that matches the top border of the current content
    * panel. This gives the appearance that the tab is being drawn behind the
    * content panel.
    * The name of the class ("TabbedPanelsTab") used in this selector is not
    * necessary to make the widget function. You can use any class name you want
    * to style this tab container.
    .TabbedPanelsTab {
              position: relative;
              top: 1px;
              float: left;
              background-color: #DDD;
              list-style: none;
              -moz-user-select: none;
              -khtml-user-select: none;
              cursor: pointer;
              font-family: sans-serif;
              font-size: small;
              font-weight: bold;
              margin-top: 0px;
              margin-right: 1px;
              margin-bottom: 0px;
              margin-left: 0px;
              padding-top: 4px;
              padding-right: 10px;
              padding-left: 10px;
              padding-bottom: 4px;
    /* This selector is an example of how to change the appearnce of a tab button
    * container as the mouse enters it. The class "TabbedPanelsTabHover" is
    * programatically added and removed from the tab element as the mouse enters
    * and exits the container.
    .TabbedPanelsTabHover {
              background-color: #CCC;
    /* This selector is an example of how to change the appearance of a tab button
    * container after the user has clicked on it to activate a content panel.
    * The class "TabbedPanelsTabSelected" is programatically added and removed
    * from the tab element as the user clicks on the tab button containers in
    * the widget.
    * As mentioned above, for our default style, tab buttons are positioned
    * 1 pixel down from where it would normally render. When the tab button is
    * selected, we change its bottom border to match the background color of the
    * content panel so that it looks like the tab is part of the content panel.
    .TabbedPanelsTabSelected {
              background-color: #FFF;
              color: #333;
              border-top-color: fff;
              border-right-color: fff;
              border-bottom-color: fff;
              border-left-color: fff;
              border-color: fff;
              outline-color: fff;
    /* This selector is an example of how to make a link inside of a tab button
    * look like normal text. Users may want to use links inside of a tab button
    * so that when it gets focus, the text *inside* the tab button gets a focus
    * ring around it, instead of the focus ring around the entire tab.
    .TabbedPanelsTab a {
              color: black;
              text-decoration: none;
    /* This is the selector for the ContentGroup. The ContentGroup container houses
    * all of the content panels for each tabbed panel in the widget. For our
    * default style, this container provides the background color and borders that
    * surround the content.
    * The name of the class ("TabbedPanelsContentGroup") used in this selector is
    * not necessary to make the widget function. You can use any class name you
    * want to style the ContentGroup container.
    .TabbedPanelsContentGroup {
              clear: both;
              background-color: #F9F9F1;
              height: auto;
              margin-bottom: 3px;
              border: .1px solid #999;
    /* This is the selector for the Content panel. The Content panel holds the
    * content for a single tabbed panel. For our default style, this container
    * provides some padding, so that the content is not pushed up against the
    * widget borders.
    * The name of the class ("TabbedPanelsContent") used in this selector is
    * not necessary to make the widget function. You can use any class name you
    * want to style the Content container.
    .TabbedPanelsContent {
              overflow: hidden;
              padding: 4px;
    /* This selector is an example of how to change the appearnce of the currently
    * active container panel. The class "TabbedPanelsContentVisible" is
    * programatically added and removed from the content element as the panel
    * is activated/deactivated.
    .TabbedPanelsContentVisible {
              background-color: #FFF;
              font-family: Arial, Helvetica, sans-serif;
              font-size: 0.75em;
              color: #333;
              padding: 20px;
              clear: both;
              margin-bottom: 5px;
              height: auto;
    /* Vertical Tabbed Panels
    * The following rules override some of the default rules above so that the
    * TabbedPanels widget renders with its tab buttons along the left side of
    * the currently active content panel.
    * With the rules defined below, the only change that will have to be made
    * to switch a horizontal tabbed panels widget to a vertical tabbed panels
    * widget, is to use the "VTabbedPanels" class on the top-level widget
    * container element, instead of "TabbedPanels".
    .VTabbedPanels {
              overflow: hidden;
              zoom: 1;
    /* This selector floats the TabGroup so that the tab buttons it contains
    * render to the left of the active content panel. A border is drawn around
    * the group container to make it look like a list container.
    .VTabbedPanels .TabbedPanelsTabGroup {
              float: left;
              width: 10em;
              height: 20em;
              background-color: #EEE;
              position: relative;
              border-top: solid 1px #999;
              border-right: solid 1px #999;
              border-left: solid 1px #CCC;
              border-bottom: solid 1px #CCC;
    /* This selector disables the float property that is placed on each tab button
    * by the default TabbedPanelsTab selector rule above. It also draws a bottom
    * border for the tab. The tab button will get its left and right border from
    * the TabGroup, and its top border from the TabGroup or tab button above it.
    .VTabbedPanels .TabbedPanelsTab {
              float: none;
              margin: 0px;
              border-top: none;
              border-left: none;
              border-right: none;
    /* This selector disables the float property that is placed on each tab button
    * by the default TabbedPanelsTab selector rule above. It also draws a bottom
    * border for the tab. The tab button will get its left and right border from
    * the TabGroup, and its top border from the TabGroup or tab button above it.
    .VTabbedPanels .TabbedPanelsTabSelected {
              background-color: #EEE;
              border-bottom: solid 1px #999;
    /* This selector floats the content panels for the widget so that they
    * render to the right of the tabbed buttons.
    .VTabbedPanels .TabbedPanelsContentGroup {
              clear: none;
              float: left;
              padding: 0px;
              width: 30em;
              height: 20em;
    /* Styles for Printing */
    @media print {
    .TabbedPanels {
              overflow: visible !important;
    .TabbedPanelsContentGroup {
              display: block !important;
              overflow: visible !important;
              height: auto !important;
    .TabbedPanelsContent {
              overflow: visible !important;
              display: block !important;
              clear:both !important;
    .TabbedPanelsTab {
              overflow: visible !important;
              display: block !important;
              clear:none !important;
              height: 100%;
    #TabbedPanels1 {
              height: auto;
              padding-top: 5px;
              background-color: #EAEAEA;
              width: 700px;
    I did read this but don't know where to start: http://www.webdevforums.com/showthread.php?27428-Dreamweaver-spry-collapsible-panel-amp-re peating-regions
    Can anybody HELP PLEASE PLEASE

    I think I counted three tabbed panels in the markup, each with an ID of TabbedPanels1
    You have only one constructor that makes one instance of the tabeed panels with an ID of TabbedPanels1
    There are a couple of things that create the problem.
    There can only be one ID with the same name in a document, thus the ID's of the TabbedPanels will need to change from TabbedPanels1 for the second and third instances to TabbedPanels2 and TabbedPanels3 (or similar) respectively.
    There needs to be a constructor for each tabbed panels like
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
    var TabbedPanels2 = new Spry.Widget.TabbedPanels("TabbedPanels2");
    var TabbedPanels3 = new Spry.Widget.TabbedPanels("TabbedPanels3");
    Gramps

  • Help with repeatable region

    HI I'm currently designing a site and am using master/detail
    pages linked to a database.
    The master detail page set function in dw8 automatically
    creates a repeatable region on the master page. I'm trying to add
    an image to that specific repeat region so that each result shows
    up with that image behind it (the image i'm using is a blank
    rectangle with a specific borderframe so that it appears that each
    result has this specific border)
    If i try adding as background image the image repeats itself
    but is out of line with the results! Any ideas how i can go about
    achieving what i'm trying to do, that is assuming I haven't totally
    bewildered you all in trying to explain it!!!!

    can i do that for each specific result? or will it not just
    border all results in that style
    the border i want is to match with button images etc... which
    have a glow effect edge to them

  • Proper syntax for email function including a repeat region

    Hey Guys, a fellow ADDT developer and myself ran into a odd challenge recently and was wondering if someone knew a shorter answer.
    LET ME BE CLEAR..I’m not looking for a suggestion, we have resolved the problem..we ARE LOOKING FOR PROPER or shortest FORMAT.
    (we used a submit redirect to a php page that used the “Send Page Section”  and then redirected back..the email looks great)
    This may be a mood point since ADDT is going away but, until then, we feel this will be an useful post because quite often you may have multiple products to email from your SQL statement.
    With that said. We used the send email function on submit.
    1.       Our email content was a HTML content file. Since it was not a php file our repeat region obviously did not work.
    2.       We substituted the HTML file for PHP (just for giggles)..no joy
    3.       We tried regular content as a string..no joy
    We know how to get single rows with the  {table.column} format…but we need to list all undetermined number of products/rows.
    So how would the string or function re-write look  if you needed a repeat region.
    EX:
    emailContent (“ this” . ‘does’. “work”);  regular string
    emailContent (“ this” . $var   . “work”);  regular string
    emailContent (“ this” .   do{  $row; } while( xxx = xxx)  . “work”);  DOES NOT WORK
    emailContent (“ this” .   while( xxx = xxx)  {  $row; }   . “work”);     DOES NOT WORK
    I assume the conflict is you can’t have a function like DO or While in the string….but I also can’t use a php include file.
    There must be a shorter, cleaner syntax that won’t require an advanced set of arrays or for each???
    so  how would a nice clean example of  repeat region results  inside email content, or include file for email contnent, look?
    Thanks

    David, in theory I agree with you, but to a large degree I am completely changing the logic of my human interface. My existing code pre-processes the raw data and saves the results to disk for any future usage. 
    It can then rapidly rebuild all pages for the entire Intranet site when your personal view of the data is changed. 
    After the full creation of all pages, the fixed pages can be viewed using your browser. 
    When you want to change your view, you run the code which completely rebuilds every Intranet page.
    My new software will approach the data differently.  My raw data will be stored with no pre-processing. The pre-processing will occur as the user changes dates and the pages will be built individually on demand, one at a time.
    The second phase of my Windows Form app will be to create pop-up windows that allow the users to modify the definitions for their custom views of the market. 
    When a view is changed, the software will be able to pre-process, as needed, the current date’s data and rebuild the current page with any new changes.
    I intend to create a Refresh.cpp file.  The various segments of the Form’s code will set variable such as date change, view changed, watch list changed, etc. and then call Refresh(). 
    The refresh code will then be able to do the minimum recalculation necessary to rebuild the proper HTML stream. 
    This is another reason to break up the code into various cpp segments such as: LoadRawData, RecalculateViews, BuildPage, etc.
    PS: David, I tried to send you a personal e-mail using your home page link. 
    Hope that was OK and not against forum rules!

  • Nested Repeat Region Question

    Hi,
    I am trying to summarise the activity within a forum. The
    forum contains 4 different discussion boards you can post to, and I
    want to list each discussion board, along with the 5 latest threads
    within each discussion board. (each thread is assigned a forumid
    value which is linked to a 'forums' table containing the forum
    name)
    I have created a page that almost works perfectly. It is made
    up 2 repeat regions: 1 for the 4 discussion boards, and another for
    the threads within them. As I said, this is working almost
    perfectly, but there is a problem. The second repeat region (for
    the threads) is not doing the repeat for each discussion board. ie,
    If I set the number of repeats to 20, it will display 20 threads
    from the first forum, rather than 5 from each of the forums. If I
    add 'GROUP BY forumid' to the query it returns only 1 result from
    each forum.
    I have attached the code - if anyone can help me out on this
    I'd be really grateful - am so close and it's really frustrating!
    Thanks a lot

    You need to create a recordset for each discussion thread
    count that is filtered by a discussionID. So you will have 4 thread
    recordsets each filtered by a different discussionID.

  • How do I keep a Repeat Region after selection?

    I have a Link/Menu button where the user chooses a city.  That populates a table with all the courses for that city.  Then the user can select any course to show information about that course I have the link set like this, charlottenccourses.php?course=<?php echo $row_getAll['course'];?>.  That is working fine, but when they select it, the table with the courses for the city disappears. So they have to select it again and hit go to see the courses again.  How can I make that stay to the same city with all the courses until they choose another one?  Thanks!

    What I have is all on the same page.  Let me explain.  I have a list/menu
    that displays all the cities.  Once that is selected, I have a "GO" button
    and that creates the table list of all the course in a repeat region.  And
    the rest of the page is a record set for which course is selected so it
    previews information for the course selected.  The link is this:
    charlottenccourses.php?course=<?php echo $row_getAll['course']; ?>
    Once that is selected all the information for that course appears.  The
    problem is, the original list of courses from the selected city now
    disappears.  So the user has to go back and select the city, "GO" button if
    they want to preview another course. I want to figure out a way to keep that
    list of courses there even when the course is selected.
    Is there a way to do that will the current structure of the page?

Maybe you are looking for