Spry tabs loading data onClick

We want to use the Spry tabs, but we have tons of data that
will be on each tab. We do not want to have to load all that data
when the tab structure loads when they possibly won’t be
clicking on every tab. What is the best way to do this where the
data in the tab is retrieved and loaded ONLY when they click the
tab?

Hi ehaemmerle,
We currently don't have any facilities built-into the
TabbedPanels widget to aid in delayed panel content loading, but
you could do something like this:
<script>
var gPanelURLS = [
"foo.php?panelID=0",
"foo.php?panelID=1",
"foo.php?panelID=2",
function LoadPanelContent(ele)
var i = TabbedPanels1.getTabIndex(ele);
var url = gPanelURLS [ i ];
var tabContentPanelEle = TabbedPanels1.getContentPanels()[ i
if (url && tabContentPanelEle)
Spry.Utils.updateContent(tabContentPanelEle, url);
</script>
<div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab"
onclick="LoadPanelContent(this);">Tab1</li>
<li class="TabbedPanelsTab"
onclick="LoadPanelContent(this);">Tab2</li>
</ul>
<div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent"></div>
<div class="TabbedPanelsContent"></div>
</div>
</div>
Of course, you'll have to either force the default tab to
load when the page is loaded, or embed your default tab content in
your page.
--== Kin ==--

Similar Messages

  • Spry Tabbed XML data panels within HTMLPanel not working.

    Many thanks for reading.
    s
    I trying to provide a rapid solution using adobe's samples
    to make Spry Tabs work within an html panel (in order to avoid
    many links in my page).
    I am using the following code:
    initial page with html panel with the ready products.js to parse the links:
    <script src="../SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="../SpryAssets/SpryData.js" type="text/javascript"></script>
    <script src="../SpryAssets/SpryPagedView.js" type="text/javascript"></script>
    <script src="../SpryAssets/SpryDOMUtils.js" type="text/javascript"></script>
    <script  src="../SpryAssets/SpryHTMLPanel.js" type="text/javascript"></script>
    <script language="JavaScript" type="text/javascript" src="../SpryAssets/SpryDataExtensions.js"></script>
    <script src="SpryNestedXMLDataSet.js" type="text/javascript"></script>
    <script src="../SpryAssets/products.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="TabbedPanels/SpryTabbedPanels.css"/>
    <script src="TabbedPanels/SpryTabbedPanels.js"></script<script type="text/javascript">
    var ds1 = new Spry.Data.XMLDataSet("ajaxbibliaxmlbridgetitle.php", "root/row[katigoria=1]", {sortOnLoad: "ID_BIBLIOU", sortOrderOnLoad: "ascending"});
    var pv1 = new Spry.Data.PagedView( ds1 ,{ pageSize:10 });
    var pv1PagedInfo = pv1.getPagingInfo();
    //var TabbedPanels1 = new Spry.Widget.TabbedPanels();          
    </script>
    </head>
    <body class="twoColFixRtHdr">
    <div id="container">
    <div id="sidebar1">
      <div id="productPageLinks">
       <ul>
        <li><a href="index.php">Index</a></li>
        <li><a href="booklist.php">Product List</a></li>
            <li><a href="test.php">Σχετικά με τη Βιβλιοθήκη</a></li>
       </ul>   
      </div>
    </div>
    <div id="mainContent">
    <br />
    <div class="HTMLPanelLoadingContent"> Waiting</div>
    <div class="HTMLPanelErrorContent"> error </div>
    </div>
    </div>
    </body>
    </html>
    Products.js (adobe'S change to can load xml dataset)
    var mainPanel = null;
    // Our initialization function which unobtrusively attaches
    // click handlers on the product links within the page.
    function InitProductPage()
    mainPanel = new Spry.Widget.HTMLPanel("mainContent" , { evalScripts: true });
        var observer = {onPostUpdate: function(){ Spry.Data.initRegions('mainContent'); 
    mainPanel.addObserver(observer);
    // For every link on the page which points to a product page,
    // attach an onclick handler that will intercept clicks and
    // and fire off a request to load the URL via the HTMLPanel.
    // For these links, we want to load the static product page
    // and extract out the content underneath the "mainContent"
    // node.
    Spry.$$("#productPageLinks a").addEventListener("click", function(e)
      mainPanel.loadContent(this.href, { id: "mainContent" });
      return false;
    }, false);
    // For every link on the page which points to a product HTML
    // fragment, attach an onclick handler that will intercept clicks and
    // and fire off a request to load the URL via the HTMLPanel.
    // For these links, we are loading HTML fragments, so there is no
    // need to specify an ID to extract out. The HTMLPanel will insert
    // all of the content recieved.
    Spry.$$("#productFragmentLinks a").addEventListener("click", function(e)
      mainPanel.loadContent(this.href);
      return false;
    }, false);
    // Add our InitProductPage() function as a load listener
    // so that it gets executed once the page has fully loaded.
    Spry.Utils.addLoadListener(InitProductPage);
    XML data and stuff all loaded correctly
    What I am trying to do is to load a second page from a link in my initial page
    that contains a Tabbed Panel.
    The page loads but no panel functionality exists. The first Panel load correctly but behaves as a simple html page .
    I have searched several hours the forums and playing around by moving the definition of Spry.Widget.TabbedPanels within
    the initial HTMLPanel page and other spots but this  produced js errors as expected (because the tab panel definitions exist in bookcategories.php)
    which is loaded only when it is called.
    Any ideas?
    Page to load is like this :
    <bookcategories.php>
    <link rel="stylesheet" type="text/css" href="TabbedPanels/SpryTabbedPanels.css"/>
    <script src="TabbedPanels/SpryTabbedPanels.js"></script>
    <script language="JavaScript" type="text/javascript" src="../SpryAssets/SpryDataExtensions.js"></script>
    </head>
    <body >
    <div id="container">
    <div id="mainContent">
             <div class="TabbedPanels" id="TabbedPanels1">
      <ul class="TabbedPanelsTabGroup">
              <li class="TabbedPanelsTab">SOmething ... </li>
              <li class="TabbedPanelsTab">Something else </li>
    <
      </ul>
      <div class="TabbedPanelsContentGroup">
              <div class="TabbedPanelsContent">Blah Blah
                  <div spry:region="pv1" id="bibliapv"><br />
                    <br />
                  <div spry:state="ready">
                      <table width="775" height="42"  >
                        <tr style="color:#900"; >
    <th etc>
                        </tr>
                        <tr spry:repeat="pv1" spry:even="even" spry:odd="odd">
                          <td >       {ID_}
                         </td>
                          <td>{Writer}</td>
                          <td>{Book_Title}</td>
                           </tr>
                      </table>
                    </div>
                  </div>
              <div class="TabbedPanelsContent">Tab 2 Content</div>
    <div class="TabbedPanelsContent">Tab 3 Content</div>
       <div class="TabbedPanelsContent">Tab 4 Content</div>
      </div>
    </div>
    </div>
    <br class="clearfloat" />
    </div>
    <script type="text/javascript">
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
    </script>
    </body>
    </html>
    Many thanks

    Ok I went back through everything and checked to make sure my
    files were in the right places both my SpryTabbedPanels.css and my
    SpryTabbedPanels.js are in the SpryAssets folder and they work fine
    until I try and add data from an xml file to them then the tabs
    populate with the info but become unclickable and the content area
    has every bit of content in on tab. Below is what I have let me
    know what I'm doing wrong I am using Spry 1.6
    <!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>Untitled Document</title>
    <script src="SpryAssets/xpath.js"
    type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js"
    type="text/javascript"></script>
    <script src="SpryAssets/SpryTabbedPanels.js"
    type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var ds1 = new Spry.Data.XMLDataSet("solutions3.xml",
    "solutions/solution");
    //-->
    </script>
    <link href="SpryAssets/SpryTabbedPanels.css"
    rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div spry:region="ds1">
    <div id="TabbedPanels1" class="TabbedPanels">
    <ul class="TabbedPanelsTabGroup">
    <li spry:repeat="ds1" class="TabbedPanelsTab"
    tabindex="0">{name}</li>
    </ul>
    <div class="TabbedPanelsContentGroup">
    <div spry:repeat="ds1"
    class="TabbedPanelsContent">{desc}</div>
    </div>
    </div>
    </div>
    <script type="text/javascript">
    <!--
    var TabbedPanels1 = new
    Spry.Widget.TabbedPanels("TabbedPanels1");
    //-->
    </script>
    </body>
    </html>

  • Spry = Exception caught while loading data.xml [object Error]

    Exception caught while loading data.xml [object Error]
    I get this mistake message then I look in the Browser to my
    create html page with put in the xml file by Spry. All my xml files
    are not shows, its shows only the error massage.
    What can I do for the repair it?
    Thanks in advance for you answer and regards.

    Hi Jay,
    While in theory it should work offline, you have run into
    the main issue.
    IE7 has a security limitation that prevents the ActiveX
    control that does the XMLHttpRequest from working from the local
    file system.
    Without being about to control the viewing environment, you
    can't guarantee it will work in all instances.
    It will work if running off a web server (
    http://localhost or otherwise).
    I wouldn't recommend it for offline use unless you can
    control the usage.
    Let me know if you have further questions.
    Thanks,
    Donald Booth
    Adobe Spry Team

  • SPRY tabs content loading

    I am using SPRY tabs to display static content. I have 4
    tabs. When the page loads the content on all 4 tabs shows up one
    below the other.
    Could anybody suggest how I can stop that. The content for
    first tab should only show up on page load.
    Other tab content should load when that tab is
    clicked.

    My tabs work but the problem I have is that the content of
    all tabs loads when the page loads making it extremely slow.
    I've got galleries in the tabs, tab1 2008 tab 2 2007 tab 3
    2006 and photos in each gallery all load together.
    On another site I did I managed to get it to load the images
    in the tab when the user clicks on the tab speeding up initial load
    times for the page but I can't remember how I did it, it was
    accidental!!!

  • Loading a flex swf into a spry tab area

    I have a spry tabbed panel in one of the panels I am
    attempting to load an swf that I created using Flex builder. The
    swf runs fine when run standalone but from within the spry tab
    although it does load and run correctly I get a nasty error message
    in both Firefox and Explorer :
    Exception caught while loading
    /azek-landing-page/bin-release/azekLandingPage.html: [Exception...
    "Access to restricted URI denied" code: "1012" nsresult:
    "0x805303f4 (NS_ERROR_DOM_BAD_URI)" location:
    "file:///C:/Sites/interstate/wwwroot/SpryAssets/SpryData.js Line:
    94"]
    I read somewhere that this has to do with Ajax and some cross
    domain issue, but at this point I'm not sure what to do.
    Any suggestions would be appreciated.
    Thanks

    Hi, You probably meant to post your thread in the Flash Forum or perhaps the Flex forum. I'm not sure, but this is the Flash Player Forum.
    http://forums.adobe.com/index.jspa  This gives the list of Forums.
    Thanks,
    eidnolb

  • Hiding spry tabs until page loads

    Greetings, I am a professional beginner
    in spry and need to know if you can hide the content
    panels in spry tabs while the page loads (like you can hide the XML
    schema while a spry list loads). I have a page with four tabs that
    takes roughly 5-8 seconds to load all of the content panels. While
    it loads, the page shows all the tabs' panels stacked, then redraws
    with only the default tab showing as it should. This looks odd to
    the users and makes the page 4x longer until it finishes loading...
    ...Any ideas?
    Thanks!

    If hiding the tab content isn't a function for the tabbed
    panel, is it possible to retrieve HTML code fragments from within
    the same document as the panels? AdobeLabs has an example using
    updateContent to load the panel content when the tab is clicked,
    but it references an external HTML page...

  • Spry Tabbed panels content loading

    Hello,
    I have created a tabbed interface, it looks good, however the
    content in some tabs it is a little heavy on some internet
    connections.
    Is there a way to load the content of each tab separately?
    What i wanted to do is for each tab content to load only if
    the user clicks on the tab, this way the start page will load much
    faster. With the current settings all the content on all tabs loads
    at the same time. Did not find anything on sprytabbedpanels.css
    that could do this.
    Can anyone help me?
    Thanks in advance.
    Joao.

    On Thu, 13 Sep 2007 00:57:12 +0000 (UTC), "manzas"
    <[email protected]> wrote:
    >Hello,
    > I have created a tabbed interface, it looks good,
    however the content in some
    >tabs it is a little heavy on some internet connections.
    > Is there a way to load the content of each tab
    separately?
    > What i wanted to do is for each tab content to load only
    if the user clicks
    >on the tab, this way the start page will load much
    faster. With the current
    >settings all the content on all tabs loads at the same
    time. Did not find
    >anything on sprytabbedpanels.css that could do this.
    > Can anyone help me?
    > Thanks in advance.
    > Joao.
    >
    >
    May we see it?

  • Sql loader:loading data file name to one of the tabe column.

    Hi,
    I want to load the data file name also to one of the table column.
    Table structure:
    File_Name varchar2
    Name varchar2
    Age number
    Data File Format:
    Vijay|24
    Anandh|24
    Senthil|26
    In the above eg how to write a control file to load the data file name to the File_Name column of the table.
    Note:
    The shell script will first pick up the data files to be loaded and calls the control file.
    Thanks,
    Vijay.

    From a unix load perspective this is what we have done :
    Create a control file (say load_data.ctl) something like
    LOAD DATA
    append
    Into table file_name_age
    File_Name constant '<FILENAME>',
    Name CHAR TERMINATED BY '|'
    Age INTEGER EXTERNAL TERMINATED BY '|' )
    in a unix loop do the following
    for i in `ls $LOADDIR` ; do
    #Replace <FILENAME> with actual filename and create a temp ctl file
    sed s/\<FILENAME\>/${1}/g < ${CTLDIR}/load_data.ctl > ${TMPDIR}/load_data_${1}.ctl
    #load using temp file
    sqlldr / CONTROL=${TMPDIR}/load_data_${1}.ctl
    DATA=$i
    #remove temp
    rm ${TMPDIR}/load_data_${1}.ctl
    done
    Where
    ${TMPDIR}=your temp directory
    ${CTLDIR}=where your main directory for ctl files
    $LOADDIR=Your data directory

  • Column Mapping while loading data via tab delimited text file

    While attempting to load data I get an error message at the "Define Column Mapping" step. It reads as follows:
    1 error has occurred
    There are NOT NULL columns in SYSTEM.BASICINFO. Select to upload the data without an error
    The drop down box has the names of the columns, but I don't know how to map them to the existing field names, I guess.
    By the way, where can I learn what goes in "format" at this same juncture.
    Thanks!

    You can use Insert Into Array and wire the column index input instead of the row index as shown in the following pic:
    Just be sure that the number of elements in Array2 is the same as the number of rows in Array1.
    Message Edited by tbob on 03-07-2006 11:32 AM
    - tbob
    Inventor of the WORM Global
    Attachments:
    Add Column.png ‏2 KB

  • Using fade/appear transition in spry tabbed panels

    I've implemented the fade/appear transition into a spry
    tabbed panel set up. The effect works in that when one clicks on a
    tab, the content in that panel will "appear" in using a opacity
    transition.
    The problem I am encountering is a pre-load of the content..
    almost a flicker at 100% opacity... and then the transition from 0%
    to 100% resumes. This flicker effect or visible pre-load of the
    content really takes away from the effect of the transition.
    Does anyone know how to solve this or correct my set up?
    I'm using the following...
    <li class="TabbedPanelsTab"
    onclick="MM_effectAppearFade('fade-guestrooms', 1000, 0, 100,
    false)" tabindex="0" onfocus="this.blur()">GUEST
    ROOMS</li>

    Yes this was a tough one to pull off in Spry. I have worked up a solution that fades between the panels. Please have a look at the following post:
    http://blog.infrontweb.com/ajax/spry/spry-tabbed-panel-fade-transition/
    Good Luck

  • Submitting a Form in a Spry Tabbed Region

    I have a spry tabbed region with 6 tabs.
    I have constructed a menu which targets and opens the specific tab using the ?tab=4 type notation.  I have also created links between tabs using the same notation.  All works fine.
    I have a form in one tab which, when I submit it, I want to return to the same tab.  However when I use the notation <form action="index.php?tab=4" > the page just reloads on the first tab, stripping off the ?tab=4 part of the url. I have searched the forums but can't find any reference to how to target a specific tab when submitting a form.
    Any help much appreciated.
    Thanks
    John

    Hi
    Thanks for your patience.
    Because there are 8 tabs on this page there is a lot of code, much of it irrelevant, so I have copied below the chunks which relate to this part of the page.
    When the form is submitted the data being returned from the database is correct and is loaded into the page. It is just that the page loads the first tab and you then have to click on the 'Results' tab to see the data which has been returned.
    Ok, from the top of the page the php code which filters the recordset is as follows;
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    // recordset for results
    $var1_rsCompResults = "-1";
    if (isset($_GET["event_ID"])) {
      $var1_rsCompResults = $_GET["event_ID"];
    $var2_rsCompResults = "-1";
    if (isset($_GET["age_group"])) {
      $var2_rsCompResults = $_GET["age_group"];
    $var3_rsCompResults = "-1";
    if (isset($_GET["gender"])) {
      $var3_rsCompResults = $_GET["gender"];
    mysql_select_db($database_connPublic, $connPublic);
    $query_rsCompResults = sprintf("SELECT tblResults.result_ID, DATE_FORMAT(tblEvents.event_start_date, '%%Y') AS year, tblResults.event_ID, tblEvents.event_name, tblResults.age_group, tblResults.points, tblIndividuals.forename, tblIndividuals.surname, tblIndividuals.sex FROM tblEvents INNER JOIN tblResults ON tblEvents.event_id = tblResults.event_ID INNER JOIN tblIndividuals ON tblResults.individual_ID = tblIndividuals.individual_id WHERE tblResults.event_ID = %s AND age_group = %s AND sex = %s ORDER BY tblResults.points", GetSQLValueString($var1_rsCompResults, "int"),GetSQLValueString($var2_rsCompResults, "text"),GetSQLValueString($var3_rsCompResults, "text"));
    $rsCompResults = mysql_query($query_rsCompResults, $connPublic) or die(mysql_error());
    $row_rsCompResults = mysql_fetch_assoc($rsCompResults);
    $totalRows_rsCompResults = mysql_num_rows($rsCompResults);
    ?>
    then the links to the Spry Assets and the  js which creates the datasets is as follows;
    <script src="../SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
    <script src="../SpryAssets/SpryURLUtils.js" type="text/javascript"></script>
    <script src="../SpryAssets/SpryData.js" type="text/javascript"></script>
    <script src="../SpryAssets/SpryDataExtensions.js" type="text/javascript"></script>
    <script src="../SpryAssets/SpryHTMLDataSet.js" type="text/javascript"></script>
    <script src="../SpryAssets/SpryNestedXMLDataSet.js" type="text/javascript"></script>
    <script src="../SpryAssets/SpryXML.js" type="text/javascript"></script>
    <script src="../SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
    <script src="../SpryAssets/SpryPagedView.js" type="text/javascript"></script>
    <script src="../SpryAssets/xpath.js" type="text/javascript"></script>
    <script type="text/javascript">
    var dsYears = new Spry.Data.XMLDataSet("competitions_year_data_xml.php", "root/row");
    var dsCompetitions = new Spry.Data.XMLDataSet("calendar_competitions_data_xml.php", "root/row[year = '{dsYears::year}']");
    var dsAgeGroups = new Spry.Data.XMLDataSet("competitions_age_group_data_xml.php", "root/row[event_ID = '{dsCompetitions::event_ID}']");
    var dsGender = new Spry.Data.XMLDataSet("competitions_sex_data_xml.php", "root/row[age_group = '{dsAgeGroups::age_group}']");
    </script>
    Then the html which creates the tabbed region is as follows;
                      <div id="TabbedPanels1" class="TabbedPanels">
                          <ul class="TabbedPanelsTabGroup">
                            <li class="TabbedPanelsTabLeft" tabindex="0">News</li>
                            <li class="TabbedPanelsTab" tabindex="1">Calendar</li>
                            <li class="TabbedPanelsTab" tabindex="2">Rules</li>
                            <li class="TabbedPanelsTab" tabindex="3">Competition Entries</li>
                            <li class="TabbedPanelsTab" tabindex="4">Results</li>
                            <li class="TabbedPanelsTab" tabindex="5">Rankings</li>
                            <li class="TabbedPanelsTab" tabindex="6">Contacts</li>
                            <li class="TabbedPanelsTabRight" tabindex="7">FAQ</li>
                          </ul>
                          <div class="TabbedPanelsContentGroup">
    Then the form which includes the four select statements is as follows;
    <div class="TabbedPanelsContent" id ="results_data">
                   <h3>Results</h3>
    <form name="selectForm" action="index.php?tab=4&" method="get">
            Year:
    <span spry:region="dsYears" id="yearSelector">
            <select spry:repeatchildren="dsYears" spry:choose="spry:choose" name="year" onchange="dsYears.setCurrentRowNumber(this.selectedIndex);">
                <option value="{year}" spry:when="{ds_CurrentRowID} == {ds_RowID}" selected="selected">{year}</option>
                <option value="{year}" spry:default="spry:default" >{year}</option>
            </select>
    </span>
            Event:
    <span spry:region="dsCompetitions" id="eventSelector">
            <select spry:repeatchildren="dsCompetitions" name="event_ID" onchange="dsCompetitions.setCurrentRowNumber(this.selectedIndex);">
                <option value="{event_ID}">{event_name}</option>
            </select>
    </span>
            Age Groups:
    <span spry:region="dsAgeGroups" id="agegroupSelector">
            <select spry:repeatchildren="dsAgeGroups" name="age_group" onchange="dsAgeGroups.setCurrentRowNumber(this.selectedIndex);">
                <option value="{age_group}">{age_group}</option>
            </select>
    </span>
            Gender:
    <span spry:region="dsGender" id="genderSelector">
            <select spry:repeatchildren="dsGender" name="gender">
                <option value="{sex}">{sex}</option>
            </select>
    </span>
    <input type="submit" value="Submit" />
    </form>
    <?php if ($totalRows_rsCompResults > 0) { // Show if recordset not empty ?>
      <div id="result_ID" name="result_ID">
        <table>
          <tr>
            <th>Athlete Name</th>
            <th>Event</th>
            <th>Score</th>
          </tr>
          <?php do { ?>
            <tr>
              <td><?php echo $row_rsCompResults['forename']; ?> <?php echo $row_rsCompResults['surname']; ?></td>
              <td><?php echo $row_rsCompResults['event_name']; ?></td>
              <td><?php echo $row_rsCompResults['points']; ?></td>
            </tr>
            <?php } while ($row_rsCompResults = mysql_fetch_assoc($rsCompResults)); ?>
        </table>
      </div>
      <?php } // Show if recordset not empty ?>
           </div> <!-- end of TabbedPanelsContent div Results -->
    Then at the end of the page is this code;
    <script type="text/javascript">
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1", {defaultTab: params.tab ? params.tab : 0});
    </script>
    </body>
    </html>
    <?php
    mysql_free_result($rsCompResults);
    ?> 

  • Spry Tab link only works once... why?

    Hi all,
    I have a spry tabbed area with 4 tabs on my page. Each tab contains data that is dragged from an MSAccess table. A couple of the tabs have repeat regions. This all works fine.  One of my tabs has a repeat region where I can click on a button image to change a record status from True to False (or visa versa). The click runs the associated vbscript which executes the SQL update statement no problem. However I noticed that when I changed the data on this tab and reloaded the page using a Response.redirect after the sql update was executed, it would default to the 1st tab and not the one I was viewing that contains the repeat region. A quick search led me to the SpryURLUtils.js file which solved that problem by allowing me to specify which tab to load. I appended the relevant code to give me this:
    Response.Redirect("myrecord.asp?" & Request.QueryString & "&tab=1#TabbedPanels1"
    As I mentioned, the tab contains a repeat region. If I click on a button to change the status of that record the page reloads fine and displays the correct tab. But this only happens once... each subsequent time I try to change another record my tab contents disappear. The tabs are still visible and if I click on the tab where I've changed the data the tab content is dispalayed, but obvioulsy this isn't right... it should reload and display the correct tab with each call of the code.If I navigate away from this page and then come back to it I can successfully chnage one record and the results are displayed. Change another record and the changes are made, but the tab contents are not displayed again. The interesting thing is that if I reload/refresh the page the problem occurs staright away on the first record change.
    So my question is 2-fold... Why is this happening and how do I solve the problem?
    Here is the vbscript that updates the record and  does the Response.redirect
    <%
    'Change Notification
    If (CStr(Request("ToggleNotify")) = "ToggleNotify") Then
    dim strSQL
    'check to see if notification is currently true or false
        If cstr(Request.Form("NotifyChanges")) = Cstr("True") Then
        'change notifiaction to false
            strSQL = "UPDATE tblUserAccess SET NotifyChanges=0 WHERE AccessID = " & Request.Form("hiddenAccessID")
        else
            strSQL = "UPDATE tblUserAccess SET NotifyChanges=-1 WHERE AccessID = " & Request.Form("hiddenAccessID")
        end if
        Set MM_editCmd = Server.CreateObject ("ADODB.Command")
        MM_editCmd.ActiveConnection = MM_VBUsers_STRING
        MM_editCmd.CommandText = strSQL
        MM_editCmd.Execute
        MM_editCmd.ActiveConnection.Close
        Response.Redirect("myrecord.asp?" & Request.QueryString & "&tab=1#TabbedPanels1" )
    End If
    %>
    Here is my Repeat region with the associated form
    <%
    While ((Repeat3__numRows <> 0) AND (NOT rsAccessRights.EOF))
    %>
    <form name="frmNotifications" method="post" action="">
      <tr class="PageText">
        <td width="200"><%=(rsAccessRights.Fields.Item("SectionTitle").Value)%>
            <input type="hidden" name="hiddenAccessID" id="hiddenField2" value="<%=(rsAccessRights.Fields.Item("AccessID").Value)%>">
        </td>
        <td width="200">
                    <%If (CStr((rsAccessRights.Fields.Item("NotifyChanges").Value)) = CStr("True")) Then %>
              <input type="image" src="../sitegraphics/accept.png" alt="Submit button">
            <%else%>
              <input type="image" src="../sitegraphics/cross.png" alt="Submit button">
            <%end if%>
        <input type="hidden" name="ToggleNotify" value="ToggleNotify">
        <input type="hidden" name="NotifyChanges" id="test" value="<%=cstr((rsAccessRights.Fields.Item("NotifyChanges").Value))%>">
       </td>
    </tr>
    </form>
      <%
      Repeat3__index=Repeat3__index+1
      Repeat3__numRows=Repeat3__numRows-1
      rsAccessRights.MoveNext()
    Wend
    %>
    And here is the bit at the bottom that specifies the default tab if nothing is passed in the URL
    <script type="text/javascript">
    <!--
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1", {defaultTab: params.tab ? params.tab : 0});
    //-->
    </script>
    Sorry for the long post!
    This is my first dabble with Spry stuff, so I'm a bit green. If anyone can explain to me why this is happening that would be most apopreciated. If anyone can tell me how to solve the problem I'll send them a big e-kiss!
    Not sure how impotant this is but it happens in both Firefox and IE8.
    Thanks in advance
    Dan

    Hi Ben, thanks for taking the time to read my query.
    The site in question is an intranet site, so I am unable to give you a link to the page. Would the entire page of code rather than just the odd bits help?
    Cheers
    Dan

  • Remote Server doesn't display SPRY Tabbed Panel

    I'm using DW CS4.  I inserted a SPRY Tabbed Panel in the main page for navigation.  The local development and testing server displays the Panel, but the remote server (Go Daddy) does not.  All of the data from the panel is displayed in one log page without the tab feature.
    The site's address is:  mailbox.mikeklonecki.com
    I saw a couple of other posts for a slideshow error using SPRY in DW, but this seems to be different behavior.  I don't get an error, rather the panel just doesn't display.
    Any feedback would be greatly appreciated.  Thank you in advance.

    I apologize.  I found my answer.
    Two required files (one .js and one .css) were not loaded into the right folder, so the page didn't have access to them.  After re-locating the files, the Tabbed panel works just fine.
    Please disregard the inquiry.

  • Spry tabbed panels with a Google map?

    I am building a website with a CS4 Spry tabbed panel (fixed size).  On one of the tabs I have a Google map.  All works well except....   When I am on a tab different from the map tab and resize the browser window, when I go to the map tab the map does not display or work correctly.  A small amount of the map will display in the upper left of the tab panel.
    Any ideas?
    Thanks, any help is appreciated.
    -David
    <div id="mainContent">
    <h2 id="pageheader">Garden Tours and Events</h2>
    <div>
    <div id="TabbedPanels1" class="TabbedPanels">
    <ul class="TabbedPanelsTabGroup">
    <li class="TabbedPanelsTab" tabindex="0">Map</li>
    <li class="TabbedPanelsTab" tabindex="0">Text</li>
    </ul>
    <div class="TabbedPanelsContentGroup">
    <div class="TabbedPanelsContent" id="map" style="height: 500px; width: 770px;">
    <script type="text/javascript">
    </script>
    </div>
    <div class="TabbedPanelsContent"  style="height: 500px;">
    <p> </p>
    <p> </p>
    <table border="0" id="gardenTourData">
    <tr>
    <th scope="col">Date</th>
    <th scope="col">State</th>
    <th scope="col">City</th>
    <th scope="col">Event Type</th>
    <th scope="col">Id</th>
    <th scope="col">Coordinates</th>
    </tr>
    <?php do { ?>
    <tr onClick="window.open('http://localhost/details.php?id=<?php echo $row_rsListGardenTours['id'] ?>','detailsWindow','width=656,height=600,scrollbars=yes')" >
    <td><?php echo $row_rsListGardenTours['tour_date']; ?></td>
    <td><?php echo $row_rsListGardenTours['state']; ?></td>
    <td><?php echo $row_rsListGardenTours['town_city']; ?></td>
    <td><?php echo $row_rsListGardenTours['event_type']; ?></td>
    <td><?php echo $row_rsListGardenTours['id']; ?></td>
    <td><?php echo $row_rsListGardenTours['start_location_coordinates']; ?></td>
    </tr>
    <?php } while ($row_rsListGardenTours = mysql_fetch_assoc($rsListGardenTours)); ?>
    </table>
    </div>
    </div>
    </div>
    </div>
    </div> <!-- end #mainContent -->

    It is best to check the forum first before asking for assistance.
    Have a look here http://forums.adobe.com/message/33236#33236
    or here http://forums.adobe.com/message/2654715#2654715
    I hope this helps.
    Ben

  • Multi page recordset output from ASP page on Spry Tabbed Panel Widget

    I am using a simple Spry Tabbed panel set on my asp page to show the output from different ASP pages, inside the tabbed panels. The tabbed panels on the page under consideration (destination page) display the output from different asp pages (source pages). The source asp pages generate multi page outputs which are paginated on the source page itself and pagination links are displayed on the source page itself.
    However, we dont want to display the source page outside of the tabbed panel, but instead the output content from the source asp pages should show inside the tabbeed panels only. The first page generated by the source asp page displays correctly inside the tabbed panel. However, when the user clicks on the links for the next page generated by the source asp page, but which is being displayed inside the destination page tabbed panel, they dont display the next page inside the tabbed panel. Instead the source asp page displays the output outside the tabbed panel destination  page.
    Please advise on how to ensure that the user can page through the recordset generated by the source asp page by clicking on the pagination links at the bottom of the records, while ensuring that the output displays within the tabbed panels on the destination asp page.
    I am enclosing the source code being used to generate the spry tabbed panel widget and also updating it with the output from the source asp page. In this case, the code given below is from the main page containing the widget and the source asp page is "sample.asp", which generates multi page output.
    Please note that I am not too keen on using xml data sets output from the source asp page, but would be more comfortable with directly using the asp pages to fill the tabbed panel content.
    Please help
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Untitled Document</title>
    <script language="javascript" src="/SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
    <script src="/SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="/SpryAssets/SpryData.js" type="text/javascript"></script>
    <link href="/SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <div id="TabbedPanels1" class="TabbedPanels">
      <ul class="TabbedPanelsTabGroup">
          <li class="TabbedPanelsTab" tabindex="0" onclick="Spry.Utils.updateContent('two','sample.asp?page=' <%=i%>); Spry.Data.initRegions();" >Tab 1</li>
           <li class="TabbedPanelsTab" tabindex="0">Tab 2</li>
      </ul>
      <div class="TabbedPanelsContentGroup">
        <div id=two class="TabbedPanelsContent">Content 1</div>
        <div class="TabbedPanelsContent">Content 2</div>
      </div>
    </div>
    <script type="text/javascript">
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
    </script>
    </body>

    I fully agree that the problem does not lie with tthe tabbed panels.
    The solution would probably be first required to be tried using ajax on any div tab.
    Then the same code would have to be used on Sprytabbed panel. Hence, the following may be advised:
    1. Sample code for server side pagination and displaying inside any div tag and refreshing it using ajax. the update link would also lie inside the div tag which would show the next/ previous page without reloading the page.
    2. Then adapting the refresh technique using ajax in the Spry Tabbed panel using the inbuilt updatecontent method of the Spry Tabbed panels.
    In order to achieve the above, I am getting the recordset output in the tab content as expected. The recordset is also getting the pagination links from server side asp as required.
    However, it is also generating the following error.
    Webpage error details
    Message: Unterminated string constant
    Line: 9
    Char: 56
    Code: 0
    URI: http://localhost/test/test5.asp
    The sourcecode is as given below. If you can help with the error indicated above, my problem would probably get solved.
    <html><head>
    <title>Untitled Document</title>
    <link href="/SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css">
    <script src="/SpryAssets/SpryURLUtils.js" type="text/javascript"></script>
    <script src="/SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
    <script src="/SpryAssets/SpryData.js" type="text/javascript"></script>
    <script src="/SpryAssets/xPath.js" type="text/javascript"></script>
    </head>
    <body>
    <div id="TabbedPanels1" class="TabbedPanels">
      <ul class="TabbedPanelsTabGroup">
        <li class="TabbedPanelsTab" tabindex="0" onclick="Spry.Utils.updateContent('one','untitled-5.asp');">Tab 1</li>
        <li class="TabbedPanelsTab" tabindex="0" >Tab 2</li>
      </ul>
      <div class="TabbedPanelsContentGroup">
        <div id=one class="TabbedPanelsContent">Content 1</div>
        <div id ="two" class="TabbedPanelsContent">Content 2</div>
      </div>
    </div>
    <script type="text/javascript">
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
    </script>
    </body>
    </html>

Maybe you are looking for

  • Where are the Vista drivers for Qosmio X300

    I have bought a qosmio x300 with q9000 quadcore and SLI 9800m gts A nice notebook. i have install on this notebook vista ultimate ( the notebook is sell with vista premium). but, i don't have the drivers ... ok, i search on toshiba web : usa, taiwan,

  • Captivate 4 crashes when recording

    Captivate 4 crashes when recording additional slides - this happens when you press 'End' to stop recording and the files are being imported into Captivate. You then have to restart Captivate, open the project, close it again in an orderly fashion and

  • Need help burning a DVD

    I've been making copies of my DVDs (legally) but I don't have a DVD burner on my 17 inch iMac. However I do on my old windows PC. I made the files all 4.7 GB with DVD2oneX but I need a way to burn it in my PC. So what kind of file do I turrn it into

  • GL History upload error

    Hello ABAP guys, For my client we are trying to test GL history upload thro LSMW, when i try to post to revenue acc 410000 with Profit Center # putting, system is asking for "Account 410000 requires an assignment to a CO object" I know that acc 41000

  • Database operations in JSP

    I am a java programmer but new to JSP and web site design. now am , designing a website for a bank in which I need to have database operations.from tutorials i see we can use beans or tag lib. which is the best in these 2? which is the simplest in th