How do I display something only if javascript is enabled?

Hi. This may be a dumb question, but I haven't been writing code all that long. Anyway, I am creating a custom online store. I used the spry menu bar to create a menu bar for the product categories. The tutorials I had been watching about how to use the spry widgets said that it's a good idea to create alternatives incase somebody doesn't have javascript enabled, so I created an alternative navigation system. The problem now is, I only want to display the spry menu bar if javascript is enabled. I know I can use the noscript tag to display the alternative navigation system is javascript is disabled, but how do I display something only if javascript is enabled?

I tried that and it doesn't seem to be working. I tried it as:
<div id="navigation">
   <script>
  <?php publicNavigation(); ?>
</script>
    <script type="text/javascript">
<!--
  var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
    <noscript>
    <?php
     startNavigation();
?>
    </noscript>
  </div>
and as:
<div id="navigation">
<script type="text/javascript">
<!--
  <?php publicNavigation(); ?>
  var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
    <noscript>
    <?php
     startNavigation();
    ?>
    </noscript>
  </div>
In either situation, nothing shows up where the menu bar should be. I know I have javascript enabled so that is not the problem. How do I get this working?

Similar Messages

  • How do you display Movies only in iPhoto?

    How do you display Movies only in iPhoto?

    Create a Smart Album like this (depending on your iPhone model)
    You'll see your iPhone pictures and all movies in the library.
    OT

  • How do I display text only in the first page inXML Publisher

    Hi everybody,
    I've been reading so much, on the last two days, on this issue at this forum but I didn't get an answer. My problem is: In an invoices report some text and fields from the invoice header, (such as payment terms, bank details etc.), should be printed only in the first page of the invoice, (If the invoice has more than one page). These elements are not in the document header/footer but in the document body. That's why I think the different fist page of MS Word will not work. I tried also <? start@first-page:body ?>, with no success. Any idea, someone?
    Thanks,
    Shimon

    Hi,
    Did you find solution to your problem? I am facing same issue and I want to know how you solved it? It would be great help.
    Thank you.
    Regards,
    Rahul

  • How can i display units only for the result set

    hi
    i do not want to display units (example: $ or %) for my key figure columns but i want to display units to the result.
    how can i do that

    Hi Surya,
    I don't think it is possible to have both non-unit and unit in the same kf.
    One potential workaround to do this is to create a calculated key figure/ formula that use the NODIM function for single values. Example: NODIM(0AMOUNT). Then, create a calculated key figure/formula that computes overall result on the same kf and supresses individual values but does not use NODIM....perhaps this can help you work out a solution.
    Hope this helps.
    Regards,
    Petter
    Message was edited by: M Petter

  • How can I display not only one account's mail but all in the central inbox?

    I am changing from OSX (machines with OSX 1.8.5 and Mavericks) mail to Thunderbird.
    However, one feature of OSX Mail I can't find in Thunderbird or have overseen it:
    I use several mail accounts, that OSX Mail is showing me on top level in one general inbox.
    Below that level, I can of course jump into the different accounts if needed to read mails only related to that account.
    Is there a similar view in Thunderbird?
    Thanks for any help
    Christoph

    http://kb.mozillazine.org/Global_Inbox

  • How do I display or hide a Java menu based on current url in a php page

    How do I display or hide a Javascript menu based on the current url in a php page?
    I want to specify when a java menu appears on a page based on the current url - does anyone have a script for the vars and conditional statements to make this happen - it would be something like this in natural language:
    <javascript>
    if currenturl = http://jemmakidd.com/categories.php
    then displaymenu
    else if currenturl = http://jemmakidd.com/categories.php?cat=14 (or 15,16 etc)
    then DONOTdisplaymenu
    What is needed is that, if you look at this page there is a java menu under the first category:
    http://jemmakidd.com/categories.php
    I WANT the menu to appear on that page so that is working, however if I look at one of the store categories, like on this page, I do NOT want the menu to appear - it may be that this can be done without using a java current url type function - thats why I'm asking...
    http://jemmakidd.com/categories.php?cat=14
    So to summarise:
    http://jemmakidd.com/categories.php (If this url is used DO display menu - if any other url DONT display menu)
    Thanks again...any ideas?
    Edited by: littlealex2009 on Jul 15, 2009 12:51 AM

    This is a Java forum, not a Javascript forum. Google the differences.
    kind regards,
    Jos

  • Apply certain css styles only when JS is enabled?

    I'm wondering if there's a relatively simple way to apply certain CSS styles only when JavaScript is enabled in the browser (and thus, not applied when JS is disabled)... I've created a jQuery-based image gallery, and I'd like to modify how it degrades by selectively disabling certain CSS styles...
    thanks for any direction here.

    Hi
    As your jQuery image gallery would not work correctly if javascript was disabled,. The better approach would be to enable the required css styles using jQuery, (the title says this, but your post says the opposite).
    To do this see the jQuery documentation regarding css, at -http://api.jquery.com/css/.
    PZ

  • Region condition: javascript is enabled?

    Hey all,
    I'm trying to think of a way to only display a region if javascript is enabled.....
    Any ideas?
    Thanks,
    Jonathan

    Here's the scenario:
    -- I'm passing a query by URL to a pop-up window.
    -- Unfortunately, I have found at least one case under which IE clears the session state of the new window window is forced to re-authenticate (SSO isn't even carried over).
    -- To counter this, I made the popup window public.
    -- However, I'm now left with a public page that anyone can send a query to and get database information back.
    -- In response, I implemented a JS function to ensure the authenticate the parent of the popup, if there even is one.
    -- However, if JS is disabled, this check doesn't happen and everything shows regardless.
    That's why I was wanting to find a way to have the report region conditional on JS being enabled. (Alternatively, does anyone know if it is standard IE behaviour that every window has an independent session state -- or if there is a way to fix this if it is not?)

  • How do I set up an indicator to display for only 1 second?

    How do I set up an indicator to display for only 1 second?
    I am reading keys from a serial device and I turn on an indicator that corresponds to the key pressed
    on the serial device but how do I set this up so that it only stays lit (enabled) for a second or two?
    The indicator is inside of a case statement and turns on OK but I do not want it to stay on for more than
    a second or two. How do I modify this to display for only a second or two?
     (P.S. I am running an old version 8.2 and can only see vis that are 8.2 or older.)
    thanks

    Simplest way to turn the indicator off (false value) after a set time is to use a Sequence structure (flat or stacked).
    Frame 1, set to true,
    Frame 2, Wait ms (wire millisecond value to wait)
    Frame 3, set to false.
    This method, however, prevents the code outside the case structure from running during that wait time.  
    Something more elaborate will allow the external code to run.  What comes to mind is a shift register that holds the indicator name and the time stamp (in milliseconds) when it was turned on, in an array of clusters.  Each iteration of your loop will check this register to see if a certain time has passed (current time stamp minus turn on time).  If so, use a case structure to turn the indicator off and remove the elements from the shift register array (so you don't keep setting the indicator to false).  The array will let you control multiple indicators independently.
    A problem with this option could arise from multiple readings.  Lets say you want to turn it off after 2 seconds, but you read the value again after 1 second (this means the indicator should be on for a total of 3).  The code would still turn it off after the 2 second mark.  Of course this really depends on the time intervals involved with your code.

  • HT201343 When I mirror my macbook pro to my apple tv the only thing that shows up is one video that's on my desktop.  How can I watch something that's online on my laptop, on my apple tv?

    When I mirror my macbook pro to my apple tv the only thing that shows up is one video that's on my desktop.  How can I watch something that's online on my laptop, on my apple tv?

    Are you using mirroring or using airplay within iTunes? If you are truly mirroring then you can view anything that is displayed on your computer through Apple Tv
    Or provide more info on your issue

  • How can I display all my e-mails.  Only some of them show up now...thanks to an apple representative in the apple store

    How can I display all my e-mails on all my Apple products?  Only some of them show up now...thanks to an apple representative in the apple store.  Also, he put my oldest emails in POP (???)

    How can I display all my e-mails on all my Apple products?  Only some of them show up now...thanks to an apple representative in the apple store.  Also, he put my oldest emails in POP (???)

  • How can i display a portlet in the Edit view only ?

    Dear All,
    I'm developing a portal in which the end user can change the content of the portal page (personalize) using Edit smart link and i ask How can i display a portlet in the Edit view only ? not shown in the production view ?

    Last time I heard with Oracle they said the only way is to look at the current URL. If it contais _mode=16 then we are in edit mode.
    This is a function I use:
    FUNCTION inEditMode return boolean is
    bEdit boolean := false;
    begin
    if PORTAL.wwpro_api_parameters.get_value('_mode', 'qaz') = '16' then
    bEdit := true;
    end if;
    return bEdit;
    end inEditMode;
    Kind regards
    Tomas Albinsson
    Stockholm, Sweden

  • How do I display AS3 Object in only one state?

    I created a AS3 object from a SWFLoader class as an animation, which I then place in a Flex stage.  I need to display the object programmatically in only one state but there is no "includeIn()" method to include it in just one state.
    Right now, it is showing up on all of the flex states.  I add this object at different times and positions in the state.  Everything is fine except it displays in all the states.
    How do I display a AS3 object in only one state?
    Thank you.

    When i use visible property as you suggested, it works, but only on one object.  I am generating more than one of these objects, so there could be 3 or 4, etc of these objects displaying concurrently at different x y positions in the state.
    Is there a way to grab all of the objects created by this AS3 class at once and apply the visible property?
    thanx

  • Noobie question: How do I add something to the display list from a non-main class?

    I know how to use addChild() within the main class to add
    something to the stage display list and have it appear on the
    screen, but how do I add something to the stage display list from
    code within another class?
    So for example say I want to add some text (myTextField) to
    the stage's display list from within NotTheMainClass' code, could
    you give an example of the necessary code?

    you must pass a reference to a display list object or create
    one that's available to your class.
    there are so many ways to do this i'm not sure how you want
    to proceed. but you can create a globally available reference to
    the stage and root timeline:

  • How do I display only key instead of description in MDX query

    Hi,
    Whenever I try to display material number, QN number.... in MDX it only displays the description instead of key. In query designer, it says "display as key and text".  How do I display the key only instead of text?
    Thanks,
    Duy

    I used your query and pointed to my query and the result is as expected - both key and text. I'm not sure what is different between our IO and mine.
    SELECT [Measures].MEMBERS ON COLUMNS,
    [0VENDOR].[LEVEL01].MEMBERS 
          PROPERTIES    [0VENDOR].[20VENDOR] ON ROWS
    FROM [MY QUERY]
    then I tried to hardcode the value it only showed me just the text. I tried different ways to make it show either just the key or both - but couldnt figure out. And one more thing I confirm is that the display settings in Bex really DOESNT matter or taken into consideration my MDX.
    SELECT [Measures].MEMBERS ON COLUMNS,
    {[0VENDOR].[ABCD]} ON ROWS
    FROM [MYQUERY]
    let me know if were able to figure it out
    Try the below statement and see what it does
    SELECT [Measures].MEMBERS ON COLUMNS,
    NON EMPTY [0NOTIFICATN__0NOT_TYPE].[LEVEL01].MEMBERS
    DIMENSION PROPERTIES [0NOTIFICATN__0NOT_TYPE].[20NOTIFICATN__0NOT_TYPE] ON ROWS
    FROM [YOURQUERY]
    Edited by: voodi on Sep 28, 2010 3:08 PM

Maybe you are looking for

  • Occured 500 internal server errors

    I coding a ap program with jheadstart(version 9.0.5.1.9) and compiler it with JDeveloper(version 9.0.5.2) then deploy to AS(10.1.2.0.2). when execution the program sometimes will occured 500 internal server errors how can i solve this problem? LOG FI

  • After Applying 11.1 PSU4/5 the Cognos Enterprise Planner Job fails

    We have recently applied Oracle 11.1 PSU5 to our Dev environment. The Application is IBM Cognos Enterprise Planner 8.4 version. The import_queue_tidy job fails with NO ROWS returned. If we use the new DLL to retry within 5 seconds, the job succeeds.

  • Voice control after 10.2.1.537 update

    The voice control on my z10 after this up date has no feedback commands. It will take commands and dictation but there is no audible response . All the settingsare what they should be and the app worked well with 10.1. Can anyone shed some light on t

  • I get green fuz in my email pictures when using firefox.

    I can switch to google chrome and the pictures are ok. I use firefox as my main browser.

  • Who's connected to my iTunes Library?

    Is there a way to know who's connected to my library? I only gave my password to one of my friends but see two users connected? Is there any utility at all? Alongside changing the password for a new one, I would like to have the ability to see who's