UpdateContent, How to defaultTab

Hi .I became spry user yesterday. The case is I have a
tabbedPanel using Spry.Utils.updateContent. I have't had problems I
click on whatever of my 3 tabs; the data is loaded nicely, but just
works wneh click on the tab and when the page is loaded the tab is
empty. I know when I build the tabs content I put nothing on them
and that's the reason when the page is loaded and the defaultTab is
set there is nothing and is untl I perform a click on the tab the
behavior is thrown, but I'm sure there is a way to load the dynamic
content for the active tab (1,2 or 3) when the page is loaded.
I have this.
<div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('a1','admin.php?cmd=users');">Users</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('a2','admin.php?cmd=notices');">Notices</li>
<li class="TabbedPanelsTab" tabindex="0"
onclick="Spry.Utils.updateContent('a3','admin.php?cmd=hits');">Hits</li>
</ul>
<div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent"
id="a1"> </div>
<div class="TabbedPanelsContent"
id="a2"> </div>
<div class="TabbedPanelsContent"
id="a3"> </div>
</div>
</div>
<script type="text/javascript">
<!--
var TabbedPanels1 = new
Spry.Widget.TabbedPanels("TabbedPanels1", { defaultTab:1 });
-->
</script>
Regards!

sure, include SpryDOMUtils.js in your page
and add this script inside the header of your page
<script type="text/javascript">
Spry.Utils.AddLoadListener(function(){
Spry.Utils.updateContent('a1','admin.php?cmd=users');
Spry.Utils.updateContent('a2','admin.php?cmd=notices');
Spry.Utils.updateContent('a3','admin.php?cmd=hits');
</script>
But if you want the data to be loaded when the dom elements
are ready to be accessed this is faster than onload, do this:
get my onDOMReady.js script
http://www.spry-it.com/builds/SpryDOMReady.js
add it under your SpryDOMUtils.js
and use this function:
Spry.Utils.onDOMReady(function(){
Spry.Utils.updateContent('a1','admin.php?cmd=users');
Spry.Utils.updateContent('a2','admin.php?cmd=notices');
Spry.Utils.updateContent('a3','admin.php?cmd=hits');
});

Similar Messages

  • How do I place external content in a Collapsible Panel

    I figured out how to add a tooltip to a collapsible panel
    today, but I am having trouble getting content to load in the
    content portion of the panel from another HTML file.
    I have created a loader.gif animation that I would also like
    to appear in the content panel while the content is loading.
    This, like the tooltips, is way above my skill level and any
    help would be appreciated. I am starting from using Spry 1.6's
    built in features in Dreamweaver CS3 and trying to expand on them
    with help using the other spry js found here in the Labs.
    Link to
    collapsible panel page I am working on
    Currently I have all the content panel text in panels. I
    would like to copy the content to another file so it can load only
    when the panel tab is opened.

    Check out this example.
    http://labs.adobe.com/technologies/spry/samples/utils/update_content.html
    its about updateContent which allows u to place content in
    your div.
    U could create a little function for it to load content in
    your divs.
    Example of load indicator + function setup:
    the indicator div
    <div id="indicatorMessageBoxId"><img
    scr="imagehere.gif" /> Please wait loading content </div>
    The function (place in <script> tags and place it in
    header (dont forget to include SpryData.js)
    function updateContent(ele,url){
    //U call this by using the command:
    updateContent('ID_toLoad_contentIn',url_of_new_content');
    document.getElementById('indicatorMessageBoxId').style.display =
    ""; //this will show the indicator loadimage box
    Spry.Utils.updateContent(ele, url, function() {
    document.getElementById('indicatorMessageBoxId').style.display =
    "none"; }); //this will hide the box when loading file is done
    u can attach this function on your collapspannel by adding a
    onclick="updateContent('myId','data/page.html');" to the
    element.
    Hope this helps :)

  • How to Upload a file to KM Content repository from a Portal Application

    Hello All
    I have a urgent requirement where i have to upload a file to a KM Content Repository from my Portal Application which is a JSP DynPage Component..
    I am new to the area of Knowledge Management...Can anyone guide me of how to achieve this functionality from my component..
    I will be highly obliged..
    Thanks
    Sundeep

    Hello Sundeep,
    Check this:
    https://www.sdn.sap.com/irj/sdn/thread?threadID=241883
    One more important doc:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5f7ced90-0201-0010-589f-8eff15a14072
    Sample coding for content creating and retrieval
    String out = new String(“my content”);
    ByteArrayInputStream data = new
    ByteArrayInputStream(out.getBytes());
    IContent newContent =
    new Content(data, “text/plain”,
    data.available());
    resource.updateContent(newContent);
    IContent oldContent = resource.getContent();
    Greetings,
    Praveen Gudapati
    p.s. Points are always welcome for helpful answers
    Message was edited by:
            Praveen Gudapati

  • Update Content with fade effect - How do I do this in 1.5?

    Hello,
    Just wondering what would be the equivalent code in spry 1.5
    to the following update content with effect code in 1.4?
    function fadeIt(ele,url){
    Spry.Effect.DoFade('apDiv1',{ duration: 500, from: 100, to:
    0, finish: function() {
    Spry.Utils.updateContent(ele, url, function() {
    Spry.Effect.DoFade('apDiv1',{ duration: 500, from: 0, to:
    100 });
    I am a little stumped how to achieve this now that the effect
    code must be BELOW the html region the effect code works on. Any
    help on this would be appreciaed.
    Regards,
    Kiwwwi.

    Hi,
    We have a special article that explains the changes from
    Spry1.4 to Spry 1.5 regarding the effects.
    You can find it
    here.
    Diana

  • Onload event after all images are loaded in an updateContent area

    Hi Spry Folks!
    I load a template into a page with a lot of img tags inside
    it. Everything works fine.
    Spry.Utils.updateContent (...HTML wit lots of img tags...)
    But the loading takes a while so I would like to hide it
    until all the images are loaded. Now I need an event which fires
    after the loading bar in the browser is gone.
    The onPostLoad observer fires much to early, cause the code
    is long loaded bevore all the images
    (...addObserver({onPostLoad:...)
    Same with the window.onload event (...window.onload =
    showContent();...) fires much to early.
    The only thing which is working is placeing the function in
    the onload event of the body tag.
    Like:
    <body onload="showContent();">
    But there I can't use it. And there is now body.onload
    handler as far as I know there is only the windows.onload handler
    and I thought always this is the same event than onload in the body
    tag.
    Has anyone an idea? Is there a spry event I haven't found for
    exact this problem?
    Thanks for your help!
    regrads
    marcus

    Hello,
    U might want to look in to the SpryImageLoader.js that comes
    with the 1.6.1 download. It loads your images, and allows u put
    callbacks on them, and set priority of loading them.
    http://www.dbooth.net/photos/
    uses it to (expect don forgot to upload the
    SpryImageLoader.js thats why its not really working :P )
    But that will give the basic idea of how to use it.
    Spry.Utils.ImageLoader.(url, callback(needs to be a function
    or null), priority)

  • Append swf file - Spry.Utils.updateContent - not work

    I don't understand this
    When I try to add swf file to Spry Tabbed Panels content -
    everything is OK. Now - in tabbed panels content I want to insert
    data from external html files. In this external file I have swf
    file and text, and images. When I preview this html external file
    in browser - all data are displayed correctly. When I try append
    this file into tabbed panels content :
    <a href="#" onclick="Spry.Utils.updateContent('apDiv1',
    'products/products1.htm'); return false;">Append file</a>
    only swf file in a new window are display.
    If I delete swf content from external html file - everything
    is ok. But if in external append file is a swf content - IE display
    only swf file.
    Is there posible to append html file with swf file in this
    method in any way?

    Hi Elaine,
    The implementation of AC_FL_RunContent() suggests that it was
    only meant to be run *BEFORE* the page finishes loading. Because
    Spry data sets and regions load and redraw asynchronously, usually
    *after* the page finishes loading, they are not compatible. As
    we've mentioned above, if Spry triggers the call to
    AC_FL_RunContent(), it will most likely be *after* the onload event
    has fired, and since AC_FL_RunContent() uses document.write() it
    will result in the entire page being overwritten by the
    <object>/<embed> tag that it writes out.
    That all said, libraries like SWFObject were designed to be
    called even after the onload event fires, at least from what I can
    tell from their samples. If you need to extract data from a data
    set to create your SWFObject, you can simply attach an observer to
    your data set that will tell the swfobject to do what it is you
    want it to do. For example:
    <script type="text/javascript">
    var dsProducts = new Spry.Data.XMLDataSet("products.xml",
    "/products/product");
    // Register an observer on dsProducts so that any time it
    changes data or the current
    // row changes, it tells the swfobject what to do:
    dsProducts.addObserver(function(notificationType, notifier,
    data)
    if (notificationType != "onDataChanged" || notificationType
    != "onCurrentRowChanged")
    return;
    // Do something with the swfobject here:
    var curRow = dsProducts.getCurrentRow();
    // The following embedSWF call is only an example of how to
    get the "productURL" column
    // value for the current row and pass it to the swfobject.
    The rest of the args, are left as names to
    // show you what you should be passing.
    swfobject.embedSWF(curRow.productURL, replaceElemIdStr,
    widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj,
    parObj, attObj);
    </script>
    --== Kin ==--

  • Spry Tabbed Panels - replace text tab with an image, how to?

    Hi all, I'm stumped. I've uploaded 2 files to:
    http://docs.google.com/leaf?id=0B4zgjxAaUD97MmUzZTk3NjMtMDNkYi00NDJjLWExNzctOWNjMzM0MDlmMj g0&hl=en&authkey=CMWGoeEP
    http://docs.google.com/leaf?id=0B4zgjxAaUD97YTQ1MDliNzEtZGVhZS00MmYzLTllZWMtMzJiODQwMjRlMT Bl&hl=en&authkey=CILrxq0G
    I'm working in Dreamweaver CS3, 4 tab "Spry Tabbed Panel" with 3 columns (one column is a form and submit btn). The 1st photo is a mockup of what I'm trying to accomplish. In the 2nd photo, Nokia designed a page for its Nokia Developer Summit 2010 (been pulled down since). This is the desired effect. I'm trying to replace the typical text tabs in the tabbed panel with images, or, at the very least, change the color between states ON and OFF (images the same except for bg color - green verses gray), which is probably the better way to go, given page load time.
    I need the CSS and HTML code. I'd settle for just the image problem, but if someone can give me guidance on the content boxes too, that would be AWESOME!
    REALLY hoping anyone can help (Ben, I'm an Aussie too) - been on this for a month now.
    Very grateful Adobe staffs such a great resource tool as this site with a lot of really good, courteous brainiacs.
    Thanks,
    Louis cat

    G'day Ben,
    Upgraded to Dreamweaver CS5, added Tabbed Panels 2 widget to page.
    Here's a mockup of what I'm trying to do: http://docs.google.com/leaf?id=0B4zgjxAaUD97MmUzZTk3NjMtMDNkYi00NDJjLWExNzctOWNjMzM0MDlmMj g0&hl=en&authkey=CMWGoeEP
    Questions:
    1. Want to change Spry TP tabs to images (see link, above), then make them vertical tabs, with morph effect - How?
    2. How do I change the default TabbedPanels2 instance name? (not easy to rename)
    3. The first section of the code was planted in my index page - shouldn't this be pasted into a CSS file, or just leave it alone?
    ================================================
    FIRST SECTION OF THE CODE: -------------------------------------------------------------------------------
    <style type="text/css">
    /* BeginOAWidget_Instance_2138522: #TabbedPanels2 */
    /* TabbedPanelsTabGroup */
    #TabbedPanels2 .TabbedPanelsTabGroup {
    top: 1px;
    left: 0px;
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
    color: inherit;
    background-color: transparent;
    border-left: solid 0px inherit;
    border-bottom: solid 0px inherit;
    border-top: solid 0px inherit;
    border-right: solid 0px inherit;
    padding: 0px 0px 0px 0px;
    /* TabbedPanelsTab */
    #TabbedPanels2.TabbedPanels .TabbedPanelsTab,
    #TabbedPanels2.VTabbedPanels .TabbedPanelsTab {
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
    color: inherit;
    background-color: #DDD;
    border-left: solid 1px #CCC;
    border-bottom: solid 1px #999;
    border-top: solid 1px #999;
    border-right: solid 1px #999;
    padding: 4px 10px 4px 10px;
    #TabbedPanels2.TabbedPanels .TabbedPanelsTab a,
    #TabbedPanels2.VTabbedPanels .TabbedPanelsTab a {
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
    color: inherit;
    /* TabbedPanelsTabHover */
    #TabbedPanels2.TabbedPanels .TabbedPanelsTabHover,
    #TabbedPanels2.VTabbedPanels .TabbedPanelsTabHover {
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
    color: inherit;
    background-color: #EEE;
    border-left: solid 1px #CCC;
    border-bottom: solid 1px #999;
    border-top: solid 1px #999;
    border-right: solid 1px #999;
    padding: 4px 10px 4px 10px;
    #TabbedPanels2.TabbedPanels .TabbedPanelsTabHover a,
    #TabbedPanels2.VTabbedPanels .TabbedPanelsTabHover a {
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
    color: inherit;
    /* TabbedPanelsTabSelected */
    #TabbedPanels2.TabbedPanels .TabbedPanelsTabSelected,
    #TabbedPanels2.VTabbedPanels .TabbedPanelsTabSelected {
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
    color: inherit;
    background-color: #EEE;
    border-left: solid 1px #CCC;
    border-bottom: solid 1px #EEE;
    border-top: solid 1px #999;
    border-right: solid 1px #999;
    padding: 4px 10px 4px 10px;
    #TabbedPanels2.TabbedPanels .TabbedPanelsTabSelected a,
    #TabbedPanels2.VTabbedPanels .TabbedPanelsTabSelected a {
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
    color: inherit;
    /* TabbedPanelsTabFocused */
    #TabbedPanels2.TabbedPanels .TabbedPanelsTabFocused,
    #TabbedPanels2.VTabbedPanels .TabbedPanelsTabFocused {
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
    color: inherit;
    background-color: #EEE;
    border-left: solid 1px #CCC;
    border-bottom: solid 1px #EEE;
    border-top: solid 1px #999;
    border-right: solid 1px #999;
    padding: 4px 10px 4px 10px;
    #TabbedPanels2.TabbedPanels .TabbedPanelsTabFocused a,
    #TabbedPanels2.VTabbedPanels .TabbedPanelsTabFocused a {
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
    color: inherit;
    /* TabbedPanelsContentGroup */
    #TabbedPanels2 .TabbedPanelsContentGroup {
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
    color: inherit;
    background-color: #EEE;
    border-left: solid 1px #CCC;
    border-bottom: solid 1px #CCC;
    border-top: solid 1px #999;
    border-right: solid 1px #999;
    padding: 0px 0px 0px 0px;
    /* TabbedPanelsContentVisible */
    #TabbedPanels2 .TabbedPanelsContentVisible {
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
    color: inherit;
    background-color: transparent;
    border-left: solid 0px #CCC;
    border-bottom: solid 0px #CCC;
    border-top: solid 0px #999;
    border-right: solid 0px #999;
    padding: 4px 12px 4px 12px;
    #TabbedPanels2.BTabbedPanels .TabbedPanelsTab {
    border-bottom: solid 1px #999;
    border-top: solid 1px #999;
    #TabbedPanels2.BTabbedPanels .TabbedPanelsTabSelected {
    border-top: solid 1px #999;
    #TabbedPanels2.VTabbedPanels .TabbedPanelsTabGroup {
    width: 10em;
    height: 20em;
    top: 1px;
    left: 0px;
    #TabbedPanels2.VTabbedPanels .TabbedPanelsTabSelected {
    background-color: #EEE;
    border-bottom: solid 1px #EEE;
    /* EndOAWidget_Instance_2138522 */
    </style>
    ========================================================
    SECOND SECTION OF THE CODE: ----------------------------------------------------------------------------------------
      <div id="TabbedPanels2">
        <h2>Tab 1</h2>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce sapien lacus, porttitor vitae pretium eget, sodales sed libero. Maecenas non urna lacus, ac sollicitudin justo. Ut erat mi, hendrerit ac accumsan ac, congue eu dui. Pellentesque consectetur condimentum elit, et eleifend urna porta id.  </p>
        <h2>Tab 2</h2>
        <p>Nulla facilisi. Vestibulum ipsum elit, tincidunt sed tristique sit amet, faucibus in orci. Nunc sit amet elit lorem. Sed eget arcu ipsum, pharetra ullamcorper lectus. Sed ac diam ac tortor mattis mollis. Etiam mattis felis vel augue tempus in rhoncus ligula elementum. Vestibulum ut iaculis risus. Aliquam erat sem, feugiat vel laoreet in, lobortis non mauris. Vestibulum neque nibh, vehicula eleifend tincidunt sed, bibendum id dolor. </p>
        <h2>Tab 3</h2>
        <p>Suspendisse potenti. Proin ut erat sit amet turpis egestas tempor. Integer arcu dolor, aliquam ut egestas nec, pharetra ut mauris. Duis urna mi, aliquam id vulputate et, consequat in dolor. Duis congue sem feugiat nulla malesuada scelerisque. Aenean vitae augue nec diam euismod imperdiet. </p>
      </div>
      <script type="text/javascript">
    // BeginOAWidget_Instance_2138522: #TabbedPanels2
      var TabbedPanels2 = new Spry.Widget.TabbedPanels2("TabbedPanels2", {
       injectionType: "replace",
       widgetID: "TabbedPanels2",
       autoPlay: true,
       defaultTab: 0,
       enableKeyboardNavigation: true,
       hideHeader: true,
       tabsPosition: "top",
       event:"click",
       stopOnUserAction: true,
       displayInterval: 5000,
       minDuration: 300,
       maxDuration: 500,
       stoppedMinDuration: 100,
       stoppedMaxDuration: 200,
       plugIns:[]
    // EndOAWidget_Instance_2138522
      </script>
    ===================================================
    Any help would be much appreciated, Ben. Cheers from another Aussie. Louis Cat!

  • Spry.Utils.updateContent() not applying CSS styles to included fragments on mobile viewing

    NOTE THAT THIS ONLY PERTAINS TO MOBILE VIEWING (tested on iPhone)
    Hi, I have a SpryTabbedPanels widget within my index.html page, where clicking each tab calls Spry.Utils.updateContent() to load an html fragment into the body of the panel content. My index.html looks something like...
    <html>
    <head>
         <!-- All the Spry includes are done here but left out for brevity -->
         <link href="stylesheet.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
         <p>This is text that is effected by stylesheet.css</p>
        <!-- The Spry tabbed panel widget is invoked here, but only the following line is pertinent -->
              <li class="TabbedPanelsTab" tabindex="0" onclick="Spry.Utils.updateContent('frag','frag.html');">Code Fragment</li>
         <!-- The rest of the code to close up the tabbed panels widget goes here -->
    </body>
    </html>
    Then the frag.html code can be anything, and here I'll just say it's...
    <p>This is a code fragment not affected by stylesheet.css</p>
    Suppose then that I have the following style sheet called stylesheet.css...
    p {
         color:#FF0000;
    If index.html is accessed in a web browser like Chrome, Safari, etc., this code will have the obvious effect of displaying:
    This is text that is effected by stylesheet.css
    This is a code fragment not affected by stylesheet.css
    However, when mobile browsing, the style sheet is not carried over to the code fragment, so the default settings for the <p> tag are used, producing black text for the second sentence above, displaying:
    This is text that is effected by stylesheet.css
    This is a code fragment not affected by stylesheet.css
    I've tried putting <html> and <head> tags with a link to stylesheet.css in frag.html, but nothing seems to work. Any help would be greatly appreciated!
    Thanks

    I think that worked.  I've been messing around for a long time trying to
    figure it out myself watching tons of drop down tutorials.  Should have
    asked a long time ago... It was hard because I wasn't completing from
    scratch and rather updating my current site.  How could I give you the
    location on the server easily?
    Lamppa Manufacturing Inc.
    Kuuma (Green) Furnaces & (Fantastic) Sauna Stoves
    P.O.Box 422
    Tower, MN 55790
    www.lamppakuuma.com
    facebook<http://www.facebook.com/pages/Lamppa-Manufacturing-Incorporated-Kuuma-Furnaces-Sauna-Stove s/215958785138157>
    [email protected]
    1-800-358-2049
    218-753-2330

  • How to test ajax parent container ?

    Hi all Spryer,
    I have a main page with many different categories and the
    page use the Spry.Utils.updateContent to refresh a main DIV
    container where i display some HTML content.
    Till here, no pb but..
    I would like to find how to make a redirection to the main
    page with the main container if someone call directly one of an
    html page who don't have to be displayed outside the main DIV
    container.
    I hope my question is quite clear. Sorry for mistakes
    SOf from france

    The inheritance chain looks something like this:
    Submit Button->ToolBar->ControlBar->RichTextEditor
    So, in keeping with your original approach, you could just go
    up the parent chain a couple more times to get to the
    RichTextEditor.
    event.target.parent.parent.parent.text should get you to the
    TextArea and...
    event.target.parent.parent.parent.id should get you your
    id

  • Multiple Effects in line // Effect.Move & updateContent

    Hi all!
    Could anybody kindly help me out? I'm totally confused about
    how to reach the following function:
    I want three actions to be made after another.
    1.) Move the <div id="main> with Effect.Move to a
    defined position, then...
    2.) Update the Content of the element <div
    id="content"> using Utils.updateContent , and if done...
    3.) move the <div id="main"> to a defined position
    again
    The ele and url variables should be passed with the link to
    start this function,
    such as < onClick="myFunction('the_ele', 'the_url.php');
    I could reach a little success, however without the first
    effect, with this one, but how can i add the first effect here,
    since Effect.Move does not support a "finish:"-function (afaik)?
    <script language="javascript" type="text/javascript">
    function myCtL(ele,url){
    Spry.Utils.updateContent(ele, url, function()
    {move_effect2.start();} );
    </script>
    Another possibility may be to make use of a cluster, but i
    don't know how to pass the variables 'ele' and 'url' for the
    UpdateContent function.
    My Cluster-experiment did look like this, however without
    success:
    <script type="text/javascript">
    UltraMove = function(element, options)
    Spry.Effect.Cluster.call(this, options);
    var StartMover = move_effect1;
    var Update = Spry.Utils.updateContent(ele,url);
    var EndMover = move_effect2;
    this.addNextEffect(StartMover);
    this.addNextEffect(CtLdr);
    this.addNextEffect(EndMover);
    UltraMove.prototype = new Spry.Effect.Cluster();
    UltraMove.prototype.constructor = UltraMove;
    </script>
    As you will surely notice, i'm a newbie concernig ajax and js
    and taking a closer look ath the samples and documents has
    extremely confused me! :-)
    Thanks in advance for any kind of help or hint!!!
    Hardy

    Hi Hardy,
    The pattern you seek (effect, update, effect) can be seen in
    this sample:
    http://labs.adobe.com/technologies/spry/samples/utils/update_content.html
    Basically you need to chain your events together by using
    observers or callback functions. In the sample above, this function
    shows the pattern:
    function fadeIt(ele,url){
    Spry.Effect.DoFade('apDiv1',{ duration: 500, from: 100, to:
    0, finish: function() {
    Spry.Utils.updateContent(ele, url, function() {
    Spry.Effect.DoFade('apDiv1',{ duration: 500, from: 0, to:
    100 });
    The function above chains the events together by defining
    callback functions for each step which then trigger the next step.
    --== Kin ==--

  • SpryTabbedPanels2 - how to show specific tab

    I have got SpryTabbedPanels 2 on a product web page, and the panels consist of:
    Product details (tab 1) -- Default --
    Product Specs (tab 2)
    Product Accessories (tab 3)
    Product Downloads (tab 4)
    Currently, I have it set to default so that it shows the tab 1 on loading the page, however, I would like to be able to have tab 4 display on page load if they navigate to this page from another specific page. I assume I have to create a link that passes via the URL which will be something like:
    product_detail.php?prodid=7&tab4
    But I don't quite know how to handle it... could you please advise?
    The page in question is:
    http://www.matthewstuartdesign.co.uk/tandr/product_detail.php?prodid=7
    Thanks
    Mat

    First off I just need to state the documentation for Spry 2.0 is referred to as Spry UI by Adobe, why I don't know.  Below is the link:
    http://labs.adobe.com/technologies/spry/ui/
    Your answer is on this page:
    http://labs.adobe.com/technologies/spry/ui/docs/tabbedpanels2/index.html
    Basically what you need to do is insert the following javascript:
    <script type="text/javascript">
        var TabbedPanels2 = new Spry.Widget.TabbedPanels2("TabbedPanels2", { defaultTab: 2 });
    </script>
    Then using your PHP script write something that will change the defaultTab value based on what variable is passed through the browser.  I believe you should be able to call the global $_GET variable in that script like: defaultTab: <?php echo $_GET['tab']; ?> in that statement.

  • How to use the Observer when a page loads

    Anybody know how to use the
    Spry.Utils.addClassName('DivName','selected') and then fire the
    Spry.Utils.addClassName with onLoad?
    I am loading a page with the selector utils in it into a div
    and then I think I must need an Observer to get the
    Spry.Utils.addClassName to work when this page loads in a div.
    Any help would be greatly appreciated.
    Thank you,
    Bisser.

    I added Spry.Utils.addClassName('DivName','selected') in the
    Script after the constructor and after the effects and it works
    fine. Thank you for your help to get me going.
    Well after the fact, this solution was a problem because it
    loads the selector each time I loaded the file.
    kinblas had the correct answer that I was looking for.... as
    it loads the selector as a 3rd argument.
    ie:
    Spry.Utils.updateContent('mainDIV','/menu.php', function() {
    Spry.Utils.addClassName('DivName','selected'); });
    Thanks to both of you for your continued support.
    Bisser.

  • Can I Use defaultTab with a Variable?

    Hello. I need to use the defaultTab values of a Spry tabbed panels with a variable but can't figure out how to do so. In short, I am creating links to specific tabs on another page like this:
    <a href="registration.html?sport=soccer&clinic=youth>
    The tabs are opened by assigning the sport and clinic names to their respective tabs like this:
    var params = Spry.Utils.getLocationParamsAsObject();
    theClinic = params.clinic;
    switch (theClinic)
    case 'youth':
        var Soccer = new Spry.Widget.TabbedPanels("Soccer", {defaultTab: 0});
      break;
    However, I now want to make sure that a default tab can be defined like this:
    var Soccer = new Spry.Widget.TabbedPanels("Soccer", {defaultTab: defaultClinic ? defaultClinic : 0});
    I was hoping to set up defaultClinic in the first piece of code (before the break) like this:
    var defaultClinic = defaultTab;
    But that doesn't work, so is there another way to take the defaultTab value and work it into a variable?
    Thank you.

    Hi,
    I don´t know the number of variables.
    Example 1:
    if (s = true) then
    column_clause:= 'emp';
    using_clause := 'var_emp';
    value_clause := ':x';
    end if
    if (y = true) then
    column_clause:= column_clause || ', emp';
    using_clause := using_clause || ', var_emp';
    value_clause := value_clause || ', :x';
    end if;
    EXECUTE IMMEDIATE
    'INSERT INTO TABLE (' || column_clause ||') VALUES ('|| value_clause ||') ||
    USING || using_clause;
    Because if I use:
    EXECUTE IMMEDIATE cmd_insert; --without "USING" clause, I have low performance.
    Someone have a sugestion to make the "Example 1" to work ?
    Thank you very much.

  • How to use php variable for default tabbed panel

    I have a tabbed panel and with tabs labelled with the days of the week.  What I want to do is open up the tab that correspond to the current day.  I have been using the following to get the day in 3 char format:
    <?php
    $jd=cal_to_jd(CAL_GREGORIAN,date("m"),date("d"),date("Y"));
    echo(jddayofweek($jd,2));
    ?>
    What I want to do is replace the value for the default tab in the following statement with a variable that matches the day returned with a number:
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1", {defaultTab:1});
    Please could anyone advice?
    Regards,
    Lloyd

    Hi,
    BIND_VARIABLE is useful when you have only IN variable but in your case you have IN and OUT.
    I don't know if you use the gateway for MS SQL SERVER or HSODBC/DG4ODBC but here how you can do to call a remote procedure with bind variables:
    DECLARE
    ret integer;
    inp varchar2(255);
    outp varchar2(255);
    BEGIN
    inp :='Hello World';
    outp :='';
    ret := "dbo"."in_out_proc_test"@tg4msql( inp, outp);
    dbms_output.put_line('Input value: ' ||v_ut1||' - Output value: '||v_ut2);
    END;
    The MS SQL Server procedure belongs to the user "dbo" and the database link
    being used is tg4msql.
    The following line initilaize the out variables of the procedure with an
    empty string:
    outp :=''
    I hope it helps you.
    Regards
    Mireille

  • How to hyperlink to particular spry panel tab

    I have spry panel which has 3 tabs. Everythings works fine.
    When I load the page which has spry panel, the content of the
    first tab is shown which is fine.
    Now I am trying to make a link from another page which points
    to the page which has spry panel. I can easily put the link but
    what I want to do is when the link is clicked I was show the
    content of third tab instead of the first tab. How do I do this?
    Can someone please help me?

    Meant to do? Meant to do anything you can get it to do
    Put this in the head of your document:
    <script src="SpryAssets/SpryURLUtils.js" type="text/javascript"></script>
    <script type="text/javascript">
    var params = Spry.Utils.getLocationParamsAsObject();
    function MM_goToURL() { //v3.0
      var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
      for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
    </script>
    Link the SpryURLUtils.js per the first line in my quoted code.
    The second script bit above calls the variable and sets up a function. Don't mess with it, just use it.
    You'll have material like this in the foot of your page, just before the closing body tag:
    <script type="text/javascript">
    <!--
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1", {defaultTab: params.tab ? params.tab : 0});
    var Accordion1 = new Spry.Widget.Accordion("Accordion1", {defaultPanel: params.panel ? params.panel: 0});
    var Accordion2 = new Spry.Widget.Accordion("Accordion2", {defaultPanel: params.panel ? params.panel: 0});
    var Accordion3 = new Spry.Widget.Accordion("Accordion3", {defaultPanel: params.panel ? params.panel: 0});
    //-->
    </script>
    These help to make your widgets work. Don't worry if you don't have what I have exactly; I copied this from one of my sites. But the
    var TabbedPanels1 = etc. etc. line you WILL have. You will also have a second one if you have TWO sets of tabbed panels on your page. The first should be TabbedPanels1, the second will be TabbedPanels2, etc., etc.
    Here's a quote from my site, showing a "call" or link to widgets in other parts of the page. I set my whole site (except more recent pages) as ONE page, so this should be similar to how you set up your call:
    <div class="image_gallery">      <a href="?tab=5&amp;panel=3#TabbedPanelsTab&amp;Accordion1" title="Disappeared Children" target="_self"><img src="images/homeArgentina.gif" alt="Argentina website" /></a><br />
          <em>Website (early project):<br />
          &ldquo;Disappeared Children: We Search for Them&rdquo;</em></div>
    Note the <a href... tag. You don't need a page name, because you are staying on the same page. But this calls tab 5 AND panel 3. If you look at my page www.gravenimagedesign.net, look for the fourth image from the left on the top row on the "home" screen. Click on it, and see where it takes you.
    Remember that all is based on zero being the first tab, 0, 1, 2, 3, etc.
    Oops, gotta go. Let me know if you need more help with this. It is something that I have to dig back into my own code to remember.
    Best,
    Beth

Maybe you are looking for

  • How do I find the header for an incoming email to locate sender's IP?

    I need to identify the IP address for a person who is spoofing me so I can block them at my server.

  • Error while opening the query

    Hi, I have created a query and i am getting error messeges while opening query in query and designer and failing to open the query. Error messeges: Terminate: Unexpected Error: RFC_ERROR_SYSTEM_FAILURE-Exception condition "INCONSISTENCY" raised. Pl l

  • Free Goods for a Combo Deal

    <H3> Hi Experts, I hope you are fine. </H3> <H4>I need to create a sales promotion. When my customer buys a combo we give a free good. For example:</H4> Shaving kit - Material A       1 - shaver - Material B       2 - shaving foam - Material C      

  • IC Booking

    Dear Friends, I have completed  IC Matching task and now want to book the intercompany differences using ICBooking functionality. Can anyone kindly let us know what Business Rule and Script Logic need to update and also want to know this booking func

  • Mpc2500/dsc525 spitting out multiple blank pages

    I've a  mac mini running mavericks 10.9.4.  I've a Gestetner MPC2500/DSc525 printer.  When I attempt to print something the printer merely spits out mostly blank pages.  some of the pages contain random lettering and numbers and special characters.