Spry - load tab content only when clicked / selected

I'm considering spry to create a multi-tab page layout.. tabs
such as 'account', 'balance', 'bin', 'history', etc.
Each tab's content is dynamic and based on moderately
demanding DB calls. Is there a way to set Spry such that
- only the default selected tab's content (on page load) is
'filled', while the content of other tabs is generated only upon
user's click?
- once a tab's content is loaded, not regenerate its dynamic
content? I think I have an idea how to do this, but doesn't hurt to
ask.
thanks.

quote:
Originally posted by:
shanbyrt
Brandan98,
I have a little script that sets the default panel whenever I
click on a tab.
I know it sounds redundant, but if/when the page reloads
onclick it reloads the default tab's contents. Just so you know I'm
not talking about persistent state stuff that V1 addressed in other
posts. :)
here's the script that I have that sets default tabs
<script type="text/javascript">
function setPanel(pan){
if (pan == 1){
var tp2 = new Spry.Widget.TabbedPanels("tp2", {defaultTab:
0});
if (pan == 2){
var tp2 = new Spry.Widget.TabbedPanels("tp2",{defaultTab:
1}); }
var tp2 = new Spry.Widget.TabbedPanels("tp2");
</script>
It seems to work for me, but may not be the best approach.
Byron
Hi Byron,
If i understand you right, this script sets the current tab
as default so if the page refreshes it reloads the current tab not
the first tab? If so this is exactly what i'm after! I'm not hot on
javascript so could you possibly expand a little on how i would
implement this in a php page??
Thanks, Mike :)

Similar Messages

  • SUBMIT button works only when clicked twice... Online interactive form

    Hi,
    I have created a interactive form with SubmitToSAP button. In this I will enter a contract number and will click SUBMIT button.
    For the first time it is fetching the contract details properly.
    In the same form, i am changing  the previously entered value with another contract number and clicking SUBMIT.
    Now the details for the previously entered contract number is only displayed. Again if i try for the same value ( which i used for the second time )  and press submit, it is workin correctly.
    So, the problem is, except for the very first time SUBMIT button action, the button works fine only when clicked twice..
    please help me in solving this issue..
    Regards,
    Surya.

    Hi,
        In addition to my previous post, I am also using RESET FORM button from Library.
    First I am entering the contract number (say 400000000) in the form and clicking submit button. The contract details are fetched and displayed in the form.
    Now i am Resetting the form using Reset Button, and giving new contract number (say 400000020).  When  I pressed Submit button , the details of the first entered contract number (400000000)  is coming.
    Then again I am giving 400000020 or any other number, it is fetching the details correctly for that number...
    Can anyone help me in this issue..
    Thanks,
    Surya.

  • Tabbed Panels: load tab content Ajax style

    What changes need to be made to load the content of each
    panel only when the corresponding tab has been clicked? I want each
    panel to contain several images, but don't want to load all of the
    images when the page loads.

    http://labs.adobe.com/technologies/spry/samples/utils/updateContent_TabbedPanels.html
    view the source to get the code ;)

  • Tab focus behavior when searching selected text

    In the previous versions of Firefox, when I selected some text on a webpage, right-clicked the text to get the context menu, and clicked the "Search" option (e.g. Search Google for "my text selection") the currently focused tab would stay focused and a new tab would be launched to handle the appropriate search in the background. Ever since I updated to Firefox 13, the new tab now receives focus when I do a search on selected text.
    How can I switch back to the old behavior? This change in functionality is driving me crazy. When reading a webpage, I often like to select words and phrases about which I want to learn more and launch searches to Google and/or Wikipedia via the context menu. I almost always like to finish reading the current page before going off to read the new tabs. Even if I did intend to stop reading the current page and go to the new tab, it often takes many seconds for the new tab to load and I would rather keep reading the current page and switch to the new tab manually than stare at a blank tab while I wait for it to load.
    In the "Tabs" tab of the options window, there is a checkbox for "When I open a link in a new tab, switch to it immediately." Is there anything like this for new tabs launched by a context menu search?
    Thanks!

    hey bob, you can enter '''about:config''' into the location bar of firefox, confirm the info notification (in case it shows up), search for the preference named '''browser.search.context.loadInBackground''' & toggle it to true by double-clicking it. that should bring back the old behaviour...

  • An error occurred while loading this content - only with iPhone not iPad

    I know this issue has been discussed to death with no real solution in sight but my case is slightly different:
    1.  On my new iPad, I select AppleTV (not mirroring), open Safari, then to YouTube and play any HD video. Immediately, the video will be streamed to the AppleTV with no hassle.
    2.  I do the same on my iPhone 4, 4S or 5 and all I get is "An error occurred while loading this content. Try again later". This occurs without fail.
    If I use Jasmine YouTube client, streaming will work perfectly but alas, this app is prone to the error message "Youtube has restricted feeds for this video" and thus, I can't use this.
    If I use the new google youTube app, only the audio gets streamed to the AppleTV. I have to use mirroring and the video does not fill the TV screen but leaving a dark border all round. The streaming is not smooth either. The previous youTube app by Apple works perfectly - never had an issue. As soon as iOS6 came along, I end up with all these problems.
    Is there a solution to all this? Currently, I use only my iPad for streaming YouTube videos but I really want to use my spanking new iPhone 5 but can't.
    I am so sad.
    Can anyone help or am I doomed to use only my iPad for this? I am soooo disappointed with the iPhone 5 due to this.

    Has any other fixes been found.  Since I updated to the latest iOS I've been having a similar problem.  It doesn't matter what I stream through either.  I bought I ATV2 when they first came out and have been using it perfectly fine, however after the last update I haven't been able to stream my movies, tv or even Netflix. 
    I've also been having issues with my ATV2 connecting to my windows 7 desktop where I store all of my movies and TV shows.  I have to deauthorize home sharing and turn it back on for my ATV2 to recognize that it is even on.  Frustrating to say the least.

  • Load new data only when needed

    I am trying to reduce the number of unnecessary load request to the server. I have this:
    var ds1 = new Spry.Data.XMLDataSet("test2.php", "export/row", {sortOnLoad: "grade_id", sortOrderOnLoad: "ascending", distinctOnLoad: true, useCache: false, loadInterval: 2000});
    But I want to update regions associated with this dataset only when i click a button, that way i dont kill the server , what is the best way to do that.

    Call ds1.loadData(); when you click the button.

  • How to change datetime column in editform only when enduser select contenttype "X". Other contenttypes do nothing with this column?

    I have a sharepoint 2013 portal. I have custom documentlibrary with 10 contenttypes. When you upload a new document you can select a contenttype. After selecting the contenttype you see the columns/fields to fill in. One of the fields is a datetime column.
    I would like set in 1 situation the value at "date of today + 3 year". The situation is when the enduser select contenttype "X". How can I implement this? Maybe in javascript?

    Changing the value using Javascript only changes the displayed value for the user.  It does not prevent the user from changing the value to something that isn't correct for example if this date is the expiration date of a document, these dates are set
    by policy (3 years) but if the user is able to set the date, they may set it to less than 3 years which may or may not be desirable.
    Instead, why not use a workflow to set the value based on the Content Type that was selected and the date of the transaction?
    I trust that answers your question...
    Thanks
    C
    |
    RSS |
    http://crayveon.com/blog |
    SharePoint Scripts | Twitter |
    Google+ | LinkedIn |
    Facebook | Quix Utilities for SharePoint

  • I cannot get a new tab to open when clicking the plus sign beside an open tab or clicking the "open new tab" button via right clicking my mouse.

    I can no longer get a new tab to open by clicking the new tab button. New tabs do open only when I click on a link in the current tab or by right clicking the home button and opening that specific page.

    This issue can be caused by the Ask<i></i>.com toolbar (Tools > Add-ons > Extensions)
    Your system details show that toolbar in the user agent as AskTbX-SD/3.12.2.16749
    See:
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • I get the erroor message 'couldn't load XPCOM' but only when i try to access my Netflix Desktop App . I have tried unsuccessfully to corect this. My OS is Linux

    After the last Firefox update to Firefox 19.0.2, I got the error message "Couldn't load XPCOM" when i attempted to open my Netflix Desktop App, I did not get that error message when starting Firefox only when trying to open Netflix. I thought it had something to do with Netflix so I removed it then reinstalled but the error message continued. I searched and asked questions to no avail. I did a command line search: "locate /xpcom" It came up with a list of files relating to xpcom, only one refering to Firefox itself and they all ended with xpcom.dll. When i did a search in the File folder I found this:
    usr/lib/firefox/libxpcom.so .
    One of the people trying to help told me this:
    "The error is caused by the lack of the path "/usr/lib" in the environment variable LD_LIBRARY_PATH
    Solution
    Add the /usr/lib path to the environment variable in this way:
    export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH"
    I was informed to do the following:
    "Get to a command line prompt (CLP) and use gedit to add that line to your .bashrc file:
    your.account> gedit .bashrc
    when you're done, just save and exit. Log out and back in, and from then on whenever you log in, it will be in the LD_LIBRARY_PATH for you. You might also want to copy .bashrc to some sort of saved version; I use bashrc.sav."
    No change.
    I have done a reinstallation of Firefox and numerous reinstallation of Netflix all with no change.
    Is there a chance that a complete removal of Firefox followed by a reinstallation correct the problem? i don't want to do that unless it is the only solution.
    Oddsbodkin

    Hello Oddsbodkin,
    It looks like the creator of Netflix Desktop has a site for the project here:
    https://answers.launchpad.net/netflix-desktop/
    I would try posting your question there and see if anyone else has encountered this error and has a solution.
    Cheers, Patrick

  • Application loaded, but won't play - flashes only when you select it

    Help
    I have downloaded Facebook, Skype and a couple of other apps. They worked yesterday. Today, when I click on them they flash only but won't load. What can I do?

    Have you tried basics from the manual?
    Restart?
    Reset?
    Restore?
    http://manuals.info.apple.com/enUS/iPod_touch_3.1_UserGuide.pdf

  • Tabs react slow when clicked on and often open in a new window

    When switching to another tab in the same window Firefox will often not respond for several seconds. Sometimes it just opens the tab I clicked on in a whole new window, this will make Firefox not respond for several seconds. This happens very often, even when there is low cpu usage.

    Go to Tools->Options->Apps
    Here you should see two columns: Content Type on the left, Actions on the right.
    Find and select excel spreadsheet or any other content type in the left column. There should be a corresponding action in the right column. What is it? You can use the drop-down list to select the option you want:
    Always Ask - Firefox will ask each time: What do you want to do with this file?
    Save file - Firefox will save this file to your computer
    Use - Firefox will give this file to the program to open it
    In case of saving, Firefox will either prompt you every time where you want the file to be saved, or save it to the default location. It depends on the preference in
    Tools->Options->General->Download

  • Swatches loading into background color when clicked, not foreground

    Can someone advise. When I mouse click on a swatch from the brush tool the color I select is loaded into the background color instead of the foreground color. Then to use the color I have to slide the reverse tool, which is a pain and slow. How can I have the clicked color load into the foreground first? I'm in Mac CC.
    Thanks,
    Seth

    It can be hard to tell which color chip in the color panel is actually the active one.
    The active color chip in the color panel will have either a white or grey line around it, depending on the ui interface color photoshop is using)
    When you use the eyedropper are you using any modifier key like Command.
    You shouldn't need to use any modifier key with the Brush Tool selected and clicking on one of the swatches in the Swatches panel to set the foreground color.
    (with the brush tool selected, holding down the command key while clicking on one of the swatches will set the background color in the toolbox)
    If nothing seems to work, i would reset the photoshop preferences
    Press and hold the Shift+Command+Option keys just after starting the launch of photoshop
    Keep holding the keys down until you get a dialog asking if you want to delete the adobe photoshop settings file
    Press Yes

  • Animated tab box - playReverse when click elsewhere?

    Hello!
    I've got a bit of a tricky one I'm hoping someone could help me with!
    I've designed what is basically a tabbed info window in Edge Animate to add to a website deigned in Muse.  There are 5 animated headings and when each one is clicked, the relevant info is revealed below it...
    So, I've got so far:
    MouseEnter:      sym.getSymbol("Heading1").play('Over');
    MouseLeave:     sym.getSymbol("Heading1").playReverse();
    Click:                 sym.getSymbol("Heading1").play('Click');
                             sym.getSymbol("Info1").play('Click');
    And what I'd like to add is - when Heading2 (or Heading3 /4 /5) is clicked, Heading1 then playReverse to resume the initial state and the animation of Heading2 follows...
    I've already tried a  sym.getSymbol("Heading1").playReverse();  But I need it to look at which symbol is currently activated and only play that one in advance.
    I hope that makes sense!
    Me second problem is once the heading is clicked, I'd like it to stay that way until another heading it clicked.  At the moment the MouseEnter and MouseLeave actions still work if you roll over the heading.
    I'm a newbie so please keep it as simple as you can!   And any help would be greatly appreciated!
    Here's my project if it helps to see:  http://we.tl/GXk9jqCupP
    Thanks :-)

    I am back with upgraded demo files and an attempt with your case.
    1) Demo file "buttons and panels" using Edge API: API button panel_upgraded.zip - Box
    2) Demo file "buttons and panels" using extra API: https://app.box.com/s/n6trsx2riyglutvveujf
    3) Your case: Website_CDMVD_SymbolsV3 - copie.zip - Box
    I began to make simpler the stage panel (one button, one panel). So i group some symbols using "convert to symbol".
    I added the compositionReady panel, and panels trigger to manage change panels.
    It doesn't yet run fine. I will go on.
    Do you want these effects (demo files)?

  • Firefox 3: QuickTime Poster Movie does not load QT media file when clicked

    I have a video podcast website (thomasbrin.com) that uses the the Apple-provided JavaScript utility and the QTWriteOBJECTXHTML function call on each of my podcast episode webpages to automatically generate the proper object and embed tags. The page loads with a poster movie which, when a user clicks on, should connect to the podcast media file and begin playback.
    This coding technique works fine in Safari and IE but fails in Firefox. Instead, when a user clicks on the poster movie, nothing happens. No errors are generated, the webpage just remains unchanged.
    This issue came to my attention from a viewer of my video podcast. I loaded Firefox 3 and am having the same issue my viewer reported.
    You can visit this page to see the issue directly: http://www.thomasbrin.com/GOT3mov.html Load the page in Firefox 3 and click on the poster movie.
    I've verified that on my system the QuickTime plugin is properly installed and Javascirpt is enabled in Firefox.
    I have searched the Firefox and Apple support forums but have come up empty. Any ideas?

    Okay, problem solved. And, of course, it was a very simple solution.
    Baby Boomer, if you read this post would you please retest this page (http://www.thomasbrin.com/GOT3mov.html) in Camino and let me know if it works for you now.
    The issue with the Camino browser got me thinking about the differences between the Gecko rendering engine (used by Firefox, Camino, SeaMonkey, and more) and the WebKit rendering engine used by Safari. I realized that Safari may be better at inferring MIME types than Firefox et al. In other words, since the target file in my Javascript script is clearly a QuickTime file (it has a .mov extension after all), Safari implicitly assumes the correct MIME type. On the other hand, Gecko-based browsers may be more strict and require an explicit reference to a MIME type for certain media files (like QuickTime) to load properly.
    So, all I did was add an attribute pair to my script that declares the proper media MIME type and it works.
    Here's my old script (without the script tags):
    QTWriteOBJECTXHTML('BrinPoster2.jpg','640','376','',
    'HREF','http://www.thomasbrin.com/QTEncodings/GOT3NS.mov',
    'TARGET','myself',
    'CONTROLLER','False');
    Here's my new script (without the script tags):
    QTWriteOBJECTXHTML('BrinPoster2.jpg','640','376','',
    'HREF','http://www.thomasbrin.com/QTEncodings/GOT3NS.mov',
    'TARGET','myself',
    'TYPE','video/quicktime',
    'CONTROLLER','False');
    The explicit MIME type made the difference.

  • Playing Smart Shape Audio Only When Clicked

    I’m working on a project in Captivate 6 that has a lot of audio usage. When a slide begins, an audio file plays automatically. There are also two visible buttons per slide, made from smart shapes, that each contain a different audio file. After the learner clicks one of the smart shape buttons, I need it to play an audio file in response to the learner’s answer.
    The problem I’m having is that both the slide audio and the two buttons’ audio begin playing concurrently when the slide begins (an auditory triple exposure). Can an advanced action be created to pause the smart shape button audio so it won’t play until the button is clicked?
    NOTE: I tried attaching the button audio files to success captions (which are connected to the smart shape buttons) to cause them to wait until clicked before playing. This worked successfully, but this also is problematic. If the second success caption is clicked before the audio from the first one is done playing, they both play at the same time. If there was a way to apply advanced actions to success captions to fix this, that would be great, but, I don’t see any options in the properties window.
    Is there a solution to my problem?

    @Sreekanth  You have a superfluous command. No need to stop a triggered audio when you want to play another audio clip. Both statements/commands are designed so that you can only play one audio clip at the same time, which means that 'Play Audio...' will automatically stop the former audio clip. However the slide audio can not be stopped with Stop Triggered audio. Did you check your solution? Slide audio can not be controlled separately, you can only mute it with cpCmndMute. But that will mute all audio.
    @5deMayo (significance of that nickname is puzzling?) If you want to be able to control the slide audio, you have to get rid of the slide audio and use the Play Audio command on entering the slide. Use that same command to add to the advanced action triggered by the shapes. No need to add the command Stop Triggered Audio, which is only necessary when you want to stop an audio clip without starting another one.
    Have a look at: http://blog.lilybiri.com/statements-advanced-actions-in-captivate-6-li
    Lilybiri

Maybe you are looking for

  • Links are not working with Firefox and some other browsers

    Hello, On my site (iWeb08) I have some pictures of pieces of text as a link to another page of website.. but with some browsers the links doesn't work. Also de links are very difficult to activate on the site.. What I mean is when you want to click t

  • Nokia 2330 memory

    Hi. I bought a nokia 2330 classic and I was told it had a 32 Mb internal memory (on each technical specification pages about this phone this is also noted). Now, when I search inside the phone, I can't find that much memory, just about 11 Mb... I upl

  • IBook as key board for iMac

    Hi everyone. I just got a new G4 iBook and was wondering if there is any way to use it as a wireless keyboard (and maybe a wireless mouse) for my G5 iMac.

  • Credit terms with No. of days

    Dear Experts In my client site new req. has come up-Business scenario is for credit Mgt based on credit limit and credit period. e.g. A customer can buy two different product from two diff sales area.If he buys product from first sales area credit pe

  • Receiver determination / Monitoring the messages.

    Hi. I'm trying to set up simplest File to File scenario. Sending channel generates messages and I can see them through Integration monitoring workbench. But I do not see the messages from SXMB_MONI. Is it supposed to be this way ? My problem is that