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.

Similar Messages

  • How to use Decode with a variable

    Maybe you've seen this done.
    I want to take statement strMenu4 and subtract the previous value
    that is stored in an array as shown in strMenu5.
    My problem is this change as shown in strMenu5 produces
    an error code:
    ORA-00904 invalid column name
    So either I'm coding something wrong or it can't be done within the
    SUM(decode) construct. If I replace the variable with a literal
    like 1000 the code works:
    SUM(decode(name,'DBWR lru scans', c1.value) - 1000) DBWR_lru_scans
    but with an array variable or even a constant the code fails:
    SUM(decode(name,'DBWR lru scans', c1.value) - Array(3)) DBWR_lru_scans, "
    Any ideas how I can use Decode with a variable and not have it interrupt it
    as a invalid column name?
    Thanks,
    Joseph Karpinski
    [email protected]
    [email protected]
    strMenu4 = "SELECT d1.instance, " _
    & " to_char(sysdate, 'dd-mon-yy hh24:mi:ss') start_time, " _
    & " SUM(decode(name,'DBWR buffers scanned', c1.value)) DBWR_buffers_scanned, " _
    & " SUM(decode(name,'DBWR lru scans', c1.value)) DBWR_lru_scans, " _
    & " SUM(decode(name,'db block gets', c1.value)) db_block_gets , " _
    & " SUM(decode(name,'consistent gets', c1.value)) consistent_gets , " _
    & " SUM(decode(name,'physical reads', c1.value)) physical_reads " _
    & " from dual, v$sysstat c1, v$thread d1 " _
    & " group by d1.instance "
    strMenu5 = "SELECT d1.instance, " _
    & " to_char(sysdate, 'dd-mon-yy hh24:mi:ss') start_time, " _
    & " SUM(decode(name,'DBWR buffers scanned', c1.value) - Array(2)) DBWR_buffers_scanned, " _
    & " SUM(decode(name,'DBWR lru scans', c1.value) - Array(3)) DBWR_lru_scans, " _
    & " SUM(decode(name,'db block gets', c1.value) - Array(4)) db_block_gets , " _
    & " SUM(decode(name,'consistent gets', c1.value) - Array(5)) consistent_gets , " _
    & " SUM(decode(name,'physical reads', c1.value) - Array(6)) physical_reads " _
    & " from dual, v$sysstat c1, v$thread d1 " _
    & " group by d1.instance "

    Re-posting in the SQL and PL/SQL forum.
    It's more appropriate.
    Thanks,
    Closing

  • Can I use ajaxOnLoad with a function to which I give a parameter?

    I accidentaly posted this on the live docs... So here I go again:
    Can I use ajaxOnLoad with a function to which I give a parameter? 
    e.g.: 
    <cfset ajaxOnLoad("initCourses('#tmpUUID#')") /> 
    The JS function looks as following: 
    initCourses=function(tmpUUID){ 
         ColdFusion.Layout.collapseAccordion('awCourseList','awCourseList_1_'+tmpUUID); 
         // the _1_ in the name is set through the currentRow attribute while looping through a query
         setWinUnsaved; 
    I'm having the problem, that my first accordion panel doesn't initialize hidden, so I wrote this method. Later on I noticed, that the accordions were somehow cached, so the URL params given whithin the source weren't right anymore. This might be, because I gave name attributes to the layoutareas. I added an UUID to the name attribute so the source wasn't cached anymore. But now it doesn't seem to find the cflayout container anymore. (I checked the name of the layoutarea and the temporary saved uuid, they are the same.) 
    I tried using cfhtmlhead instead, but that didn't seem to work neither.

    So I've been searching the whole day yesterday and many hours today and this is what I got:
    <cfsavecontent variable="jsheadcont">
         <script type="text/javascript">
         <!--
              initCourses('#tmpUUID#');
         //-->
         </script>
    </cfsavecontent>
    <cfhtmlhead text="#jsheadcont#">
    And that's what my JavaScript function looks like:
    initCourses=function(tmpUUID){
         setTimeout("ColdFusion.Layout.collapseAccordion('awCourseList','awCourseList_1_"+tmpUUID+ "')",1);
         setWinUnsaved;
    So I'll have to write all that instead of a simple
    <cfset ajaxOnLoad("initCourses('#tmpUUID#')") /> ?
    Or am I completely wrong? I forgot to mention that the accordion is inside a tab-layout which is inside a border-layout.
    Cheers
    Boris

  • Is it necessary to use semaphores with shared variables

    is it ok to use semaphores with shared variables to prevent race conditions or is that built into the shared variable?
    - James
    Using LV 2012 on Windows 7 64 bit

    Semaphores are more of a method to protect a section of code from executing, and as tst as said they won't really help you.  There is nothing inherently harmful about having 2 sections of code trying to write to a shared variable at the same time.  Nothing like a crashed program, scrambled value, or an error message.  What will happen is that whatever happens 2nd is the value that sticks.  So a shared variable can still have the possiblility of race conditions just like local and global variables if you are dealing with multiple writers.  That is really an architecture problem.

  • I ordered my Macbook Air with Aperture two years ago. I now have an iMac - can I use that with Aperture in any way?

    I ordered my Macbook Air with Aperture two years ago. I now have an iMac - can I use that with Aperture in any way? I appreciate that it is a different computer but I am now the end user of both devices and I was just wondering if it was possible.
    Thanks,
    Sean

    The answer would be in your software license agreement for Aperture. However if you cannot locate it you can ask in the Aperture forum, the link for that is:
    https://discussions.apple.com/community/professional_applications/aperture
    However I believe you can have Aperture installed on two machines however only one may be using it at a time.
    On the new iMac launch the Mac App Store - Purchased - look for Aperture and download to your new machine.

  • I installed 5 but now I can't use it with Mac osx - how do I go back to my old version?!

    I was prompted to install Firefox 5 on my Mac. Now when I try to open it says I can't use Firefox with osx. How do I go back to using the previous version - has it been written over? My previous version was fine!

    Firefox 4 requires at least OS X 10.5 and an Intel Mac. There is a third party version of Firefox 4 that runs on OS X 10.4/10.5 and PPC Macs, for details see http://www.floodgap.com/software/tenfourfox
    If you prefer, you can get the latest version of Firefox 3.6 from http://www.mozilla.com/en-US/firefox/all-older.html
    Mozilla are working to prevent Mac users with non-compatible systems from getting the notification about Firefox 4, and also not displaying the "Download Firefox 4" button on http://www.mozilla.com

  • I gave my old iPad to my daughter without restoring it to original configuration, how can she use it with her iTunes?

    I gave my old iPad to my daughter without restoring it to original configuration, how can she use it with her iTunes?

    try
    http://support.apple.com/kb/ht2589

  • How can I use LCCS with ActionScript 3 and Flash CS4?

    Hi,
    Using Stratus I was able to create an an application using Action Script 3 and Flash CS4.  The sample code on the Adobe site was quite straight forward and easy to understand.  I now want to switch over to  LCCS but can't find anything any where on how to use Action Script 3 and Flash CS4 with LCCS.  Do I need to know Flex to be able to use LCCS?  Everything was quite simple and easy to understand with Stratus and makes complete sense.  But LCCS is really confusing.  Is there any sample code on how to establish a connection in Action Script 3 and then stream from a webcam to a client.  There is nothing in the  LCCS SDK that covers Flash and Action Script 3.  Please help!  I found the link below on some forum but it takes me nowhere.
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=75 9&threadid=1407833&enterthread=y

    Thanks Arun!
    Date: Thu, 29 Apr 2010 11:44:10 -0600
    From: [email protected]
    To: [email protected]
    Subject: How can I use LCCS with ActionScript 3 and Flash CS4?
    Hi,
    Welcome to the LCCS world.
    Please refer to the SDK's sampleApps folder. There would be an app called FlashUserList. The app demonstrates how LCCS can be used with Flash CS4. Its a  pretty basic app, but should help you moving.
    We are trying to improve our efforts to help developers in understanding our samples. Please do let us know if we can add something that would help others.
    Thanks
    Arun
    >

  • How can I use Bluetooth with another devices?

    How can I use Bluetooth with another devices?

    You can set up your FaceTime account in Settings > FaceTime.

  • How can i use ipad with apple tv

    How can i use ipad with appletv

    Assuming both devices are on the same network and that AirPlay is not turned off on the Apple TV, then simply tap on the screen when you are watching content you wish to stream to your Apple TV, then tap the airplay icon that appears in the control bar, choose the Apple TV from the menu that appears.
    When displaying the content you wish to mirror on the iPad 2 (or better), iPad Mini, iPhone 4S (or better), double tap the home button (quickly) and swipe the bottom row of apps to the right to reveal the playback controls, tap the AirPlay icon and select your Apple TV from the list of available devices.

  • How can i update my old 2006 iMac Intel core 2 duo running 10.6.8 to OSX Lion so that I can sync using iCloud with my newer devices?  Mountain Lion is not an option for my older model and Lion is no longer available at App store.

    How can i update my old 2006 iMac Intel core 2 duo running 10.6.8 to OSX Lion so that I can sync using iCloud with my newer devices?  Mountain Lion is not an option for my older model and Lion is no longer available at App store. 

    Call Apple's online store's telesales agents: 1-800-MY-APPLE (1-800-692-7753) or Customer Service and Sales Support at 1-800-676-2775. For Lion you'll get a redemptions code via e-mail and need to DL from the Mac Apple Store (requires SL 10.6.6+).

  • Can i use pandrive with iPad, i want to access word, excel, pdf files on iPad via pandrive

    Can i use pandrive with iPad, i want to access word, excel, pdf files on iPad via pandrive

    You cannot use pendriver.
    Have a look at the following:
    http://itunes.apple.com/sg/app/quickoffice-pro-hd-edit-office/id376212724?mt=8&l s=1
    http://itunes.apple.com/sg/app/office2-hd/id364361728?mt=8&ls=1
    http://itunes.apple.com/sg/app/documents-to-go-premium-office/id317107309?mt=8&l s=1
    http://itunes.apple.com/sg/app/polaris-office/id513188658?mt=8&ls=1

  • My iPhoto icon has a cross over it, when i open it, it You have "iPhoto" 9.2.1. you can't use this with this version of OSX? it used to work ?what's gone wrong?

    my iPhoto icon has a cross over it, when i open it, it You have “iPhoto” 9.2.1. you can't use this with this version of OSX? it used to work ?what's gone wrong?

    iPhoto 9.2.3 is incompatible with MacOS 10.9.3 Mavericks. If you are running Mavericks on your system you need to update iPhoto to 9.5.1. Only, the problem is, that this version is no longer available at the App Store.
    The easiest way to get a compatible iPhoto version in that case would be to upgrade to Yosemite, MacOS X 10.10, and then download the most recent iPhoto version from the AppStore, iiPhoto 9.6, like LarryHN suggested.
    If you cannot download iPhoto after upgrading to iPhoto 9.6 post back.

  • HT2499 Can I use Airplay with dvd to watch dvd on my tv via AppleTV 3?

    Can I use Airplay with dvd to watch dvd on my tv via AppleTV 3?

    Welcome to Apple Support Communities
    Of course. If your Mac is compatible with AirPlay Mirroring, you can watch your DVD in your TV with the Apple TV. Read > http://support.apple.com/kb/HT5404 You just have to play the DVD on your MacBook and turn on AirPlay Mirroring.
    If your Mac isn't compatible with AirPlay Mirroring, you can use a third-party app like Beamer

  • I can't use Quicken with Lion.  Now what?

    I can't use Quicken with Lion.  Now what?

    Peter,
    Another solution, though not particularly convinient, would be to create a Snow Leopard boot drive on a external drive that you can switch to when you want to run Quicken.
    Matt

Maybe you are looking for

  • How to get Quername while executing query in CMOD

    Hello, I have written some code for giving authorization to the users while excuting query, i need to find users with role YB_CRM_MN_ADMINISTRATOR which i can get through FM CRM_ROLES_OF_USER_GET. After that I need to find the query it is executing,

  • Can I upgrade iMAC 10,1 to latest software

    Hello Support, I have iMAC at home which I would like to upgrade to the latest MAC X.  Is it possible? The Model Identifier is iMAC 10,1 with Intel Core 2 Duo.    The Software version is 10.6.8 If this is possible, kindly provide a guidline on how to

  • Deploy BC4J to database, how to?

    Hello, I want to deploy business objects to the database and then map some methods from an application module as stored procedures. I'm using JDeveloper 10.1.3 and found an option to deploy to the database, but it fails because the database does not

  • BPC 10 installation

    Hello, do you have experience with BPC 10 NW installation? How long it takes to install it? Can you provide me some raw time estimation for installation and post-installation steps? My second question is about web client I saw architecture of BPC 10.

  • Fatal Run Time Error - unknown source position thread id

    Hi All, I am using LabWindows CVI 2013 in order to display data from my controller. I have defined some functions to activate the communication with the controller and read data from it. The communication activation with the controller is being done