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

Similar Messages

  • How can I display and hide toolbar?

    hello!
    Who can tell me, how I can display and hide ERP's toolbar?
    thanks

    it is the default i think you cannot hide the application toolbar.

  • How can i display the result of java class in InputText ?

    Hi all,
    How can i get the result of java class to InputText Or OutputText ???
    also can every one in the forum give me road map for dealing with java in oracle adf because i'm beginner in oracle adf
    i saw some samples in oracle adf corner but it's difficult for me.

    User,
    Always mention your JDev version, technologies used and clear usecase description (read through this announcement : https://forums.oracle.com/forums/ann.jspa?annID=56)
    How can i get the result of java class to InputText Or OutputText ???Can you elaborate on your requirement? Do you mean the return value of a method in a class as output text? Or an attribute in your class (bean?) as text field?
    -Arun

  • How can I filter a Sharepoint 2007 libarry list based on current user login?

    Hi all.
    I would like to know how I can filter a SharePoint library list based on current user login.
    Suppose I have created the followings:
    1) A SharePoint form library containing bunch of uploaded InfoPath form data.
    2) The InfoPath form template contains a promoted text field called "TargetUser" to store user domain login (ex: DOMAIN\JOE) and every InfoPath form file in the library has a valid domain name stored in the "TargetUser" field.
    I have created a custom view for the form library and would like to filter this view so only items whose "TargetUser" field matches current user's login ID are displayed.
    I went to Edit View page to customize the view and tried to use the [Me] function but I got a "Filter value is not a valid text string" message instead when clicking OK. Apparently [Me] returns a Person/Group data type and the filter cannot compare its value
    to that of "TargetUser".
    I tried using text functions (ex: TEXT([Me],"") hoping to extract default string value from [Me]. The filter accepts the parameter without any error but the resulting fitlered list does not display any items at all.
    I have googled this subject for hours but I have not found any solution.
    It would be greatly appreciated if anyone can help me to create a functional filtered list.
    FYI, my SharePoint 2007 installation is just WSS 3.0 + Form Server. I do not have MOSS 2007 (so no MOSS 2007 web parts or web services).
    Thank you.
    Jason

    Here's what I usually do in order to accomplish this.  Ultimately you'll need to have 2 different fields.  There's the one you already have, with DOMAIN\username stored in it.  Then you'll need an additional field as a "person" column type. 
    Call it "TargetPerson" or something.
    Create a sharepoint designer workflow that runs each time an item is created or changed.  One action:
    Set FIELD to VALUE.
    The first FIELD is "TargetPerson", the VALUE is your "TargetUser" field. 
    Once this is done, then the person value is stored in the person field.  This is the field that you can filter by "TargetPerson" is equal to [Me]
    Laura Rogers, MCSE, MCTS
    SharePoint911: SharePoint Consulting
    Blog: http://www.sharepoint911.com/blogs/laura
    Twitter: WonderLaura

  • How to change the fields in a JSF form based on a URL parameter

    I am trying to build a generic JSF form of parameters which I want to dynamically change (i.e.
    change which field is visible, what the label text should be, etc) based on a URL parameter.
    I can set the fields using logic in the backing bean as an action on a command button pressed.
    But how do I do it based on the URL parameter ? I can retrieve the URL parameter but I
    don't know where to put (or hook) the Java code to do this initialization prior to
    the page being rendered for the first time.
    The fields in the JSF is being configured dynamically using a database table.
    BTW I am using Jdeveloper 10.1.3.5
    Thanks
    CK

    Thanks. I decided to set a Session bean to store the value of the URL parameter (if it is set)
    and then to use the session bean to initialize the attributes of the fields on the JSF Page.
    There also seems to be some caching of the inputText fields (i.e. it reverts back to the first
    initialized value) even though I tried to change it using the URL parameter in the requestScope
    backing bean. So, setting the values into the Session bean and retrieving it back from there
    seems to be more reliable.

  • How do I change the size of file menu's and tool icons in Photoshop' opening page.

    How do I increase or change the size of file menu's and tool icons on the opening page/worksheet of Photoshop? The File Menu drop down commands read properly at a comfortable size. I am not sure how I accomplished this, but everything I have tried has no effect on the other page items.

    Hello, you can change most of Photoshop's interface text by going to preferences>interface>UI font size.
    For the size of the top menus and the whole interface, there is no function to do that for the moment. I suggest to vote on this thread: http://feedback.photoshop.com/photoshop_family/topics/problem_with_hi_res_monitors

  • How to Display and Hide Cotents of UI based on selection in combobox

    Hi,
       I have requirement like , a view cotaining lables and input fields and one combo box.Based on the cotent selection in combo box some lables and input fields should be hide.In html it is possible by  using javascript .So how i will do in web dynpro.
    Thanks & Regards
    muna

    Probably you don't want to show or hide individual UI elements, but rather groups or at least label/field pairs.
    So you could create for each such logical group G a context attribute "GVisibility" of DDIC type Visibility (as already explained by the other posters).
    Next, bind the "visible" property of each UI element that belongs to G to attribute "GVisibility".
    Now you have two possibilities to evaluate these attributes:
    Either
    -  assign an action to the "onSelect" event of the drop-down list and evaluate and set the attribute values in the action handler, or
    - define all attributes as calculated and write the code in the get-method of the calculated attribute.
    The first possibility will be more efficient.
    Code sketch:
    Context:
    - Entries (node, card=0:N, selection=0:1)
    + -- Value (attribute, type=string)
    + -- Text (attribute, type=string)
    - GVisibility (attribute, type=Visibility)
    UI elements:
    EntryList: DropDownByIndex
    Label: Label
    Field: InputField
    Binding:
    EntryList.texts = Entries.Text
    EntryList.onSelect = EntrySelected
    Label.visible = GVisibility
    Field.visible = GVisibility
    Action handler:
    onEntrySelected()
      IEntriesElement selectedEntry = wdContext.nodeEntries().currentEntriesElement();
      if ( selectedEntry == null )
        /* nothing selected, make elements of group G invisible */
        wdContext.currentContextElement().setGVisibility(WDVisibility.NONE);
      else if ( "some_value".equals(selectedEntry.getValue()) )
        /* make elements of group G visible */
        wdContext.currentContextElement().setGVisibility(WDVisibility.VISIBLE);
    Armin

  • How do I display the Spaces number in menu?

    When using Snow Leopard, I was able to get the space number to display in the menu.
    After upgrading to Lion this no longer display.  How can I enable this in Lion?

    The concept of spaces has changed significantly in Lion. Unfortunately, I don't think you can get that functionality back.

  • How do I display customized icons next to menu bar instead of on the same line as the URL?

    Thought I already submitted this. If this is a duplicate set of details, apologies. If previous answer posted, there was no message to that effect.
    In Windows 7, icons for most add-ons and for icons you can add with customization appears to the right of the menu bar. Now, in Windows 8, they are appearing to the right of the URL line.
    There isn't enough room on the URL line, so I would prefer they show on the menu bar line. If this isn't possible in Windows 8, count this question as a complaint about the change. If it is possible, I couldn't findl the solution in your help or forum.

    NO! In Windows 7, the command icons show to the right of the line with the '''FILE''', etc. drop-down menus, the line BELOW the top line which contains the Firefox icon (see the image).
    In windows 8, they show to the right of the line in which you enter a URL or a search string. There is not much vacant room on that line, so you can only fit a couple of icons.
    I don't know how to say it any more clearly than this.
    I want to know if it is possible to move the command icons in Windows 8 so they are in the same location as in Windows 7. If not, I'd like to know why the decision was made to do this, if deliberate, or if it was an oversight that will be fixed.

  • Show/Hide DVT Admin Menu Based on Entitlements

    Hi,
    We're using the DVT framework provided in Weblogic Portal 10.3.2 to create My Page functionality within our portal project. Part of the requirement is to offer limited functionality to non-admin users.
    For example:
    Portal Level Customization Menu
    - Show/Hide based on entitlements (we tried setting an entitlement of the Main page Book, and that worked, however after that we were unable to see the Customize Menu for any child Books/Pages)
    - Limit entries based on entitlements
    Book Level Customization Menu
    - Limit menu entries based on entitlements
    - Restrict the ability to rename book based on entitlements
    Page Level Customization Menu
    - Limit menu entries based on entitlements
    - Restrict the ability to rename page based on entitlements
    Portlet Level Customization Menu
    - Limit menu entries based on entitlements
    - Restrict the ability to rename portlet based on entitlements
    We've been able to eliminate DVT functionality for entire Books and Pages based on entitlements, however we can't find a way to provide limited functionality as described above.
    Any suggestions on how to accomplish this?
    Thank you.

    Sorry about the confusion. What I meant was, I tested with both setting entitlement and DA roles (separately) and found that the usecase you are describing works. BTW, you are right in that only visitor entitlement roles effect dvt functionality. I just wanted to check if setting DA roles wasn't causing some undesirable behavior.
    Back to the issue you are having, I am assuming you are talking about setting a 'view' entitlement for 'role1' on the primary book and logging in as a user that is not in 'role1' but has 'edit' rights on a child page or book of the primary book. In that case you shouldn't be able to see anything since you don't have view rights to the main book. If that is not the case, can you provide details about your setup?
    Here is what I tested and found working. Set an 'edit' entitlement for 'role1' and a 'view' entitlement for 'role2' on the primary book. When logged in as a user from 'role2' I cannot see the 'Customize' gear icon on the primary book but I can see the gears on child books, pages and portlets. I tested the usecase with non-primary books and that works too.
    Thanks

  • Displaying database text to java components

    hello everyone!
    i d like to ask how i can display database elements in java components.
    For instance, i have a textarea and i d like to take the text from the database and display it in the textarea..
    In addition, i d like to submit a form and the text user entered in a textarea, to be inserted in a database field.
    Any tutorials with such examples would help me!
    Thank you

    That screencast is already some kind of a tutorial.
    Further tutorials and resources:
    Swing:
    [http://java.sun.com/docs/books/tutorial/ui/index.html|http://java.sun.com/docs/books/tutorial/ui/index.html]
    Java:
    [http://java.sun.com/docs/books/tutorial/|http://java.sun.com/docs/books/tutorial/]
    Beans Binding (JSR 295):
    [https://beansbinding.dev.java.net/|https://beansbinding.dev.java.net/]
    Java Persistence API (JPA):
    [http://java.sun.com/javaee/5/docs/tutorial/doc/bnbpy.html|http://java.sun.com/javaee/5/docs/tutorial/doc/bnbpy.html]
    (Maybe you also want to buy some book about this topic...)
    -Puce

  • How to display the contents of java.util.list in a frame???

    i should use awt only not applet...
    i need to display the contents of java.util.list in a frame...
    the contents contains rows queried from a oracle database.....
    the contents should be displayed similar to how a lable is displayed..
    please help me out..
    thanks
    dinesh

    Of course there is something in AWT:
    http://java.sun.com/j2se/1.5.0/docs/api/java/awt/List.
    htmlagain, if you carefully read the question, he needs a
    table to display a JDBC result set. There is no
    pre-made table component in AWT.Well, I read that he filled the data into a java.util.List and now wants to display this list. So a List-component should be sufficient. But I might be wrong...
    -Puce

  • How to control custom button display or hide in toolbar

    I had been added four buttons in Acrobat Tool bar.
    Now I find a function AVToolButtonSetComputeEnabledProc in SDK that this function only control the button enable or disenable.
    Now I want to control the custom button display or hide, how can I to do?
    Does this SDK have a API to achieve my  need?

    As of Acrobat X, we no longer support dynamic hiding/showing – only enable/disable.

  • How can I get dataTable to display values from the java layer?

    When I use the dataTAble in my JSP page it will only display values from my java layer if the facets tag has it's name set to "header". Why is this happening?
    If I set it to "header" and I look at the page source it actually has created the correct number of rows but it doesn't put the values between the <td> tags? It see's the length of my list but it doesn't pick the values out of the list.
    <h:dataTable var="data" value="#{NameBean.test}" border="1">
    <h:column>
    <f:facet name="header">
    <h:outputText value="Name"/>
    </f:facet>
    </h:column>
    <h:column>
    <f:facet name="header">
    <!-- <h:outputFormat styleClass="outputFormat" id="format1" value="#{NameBean.test}"></h:outputFormat>-->
    <h:outputText styleClass="outputText" value="#{NameBean.test}" style="" rendered="true" escape="false"/>
    </f:facet>
    </h:column>
    </h:dataTable>
    public List gettest()
              List li = new LinkedList();
              Object Developers[] = {"M@n00j", "sdsadas"};
              for( int i = 0; i < Developers.length; i++ )
                   li.add(Developers);
              return li;
    Thanks in advance to anyone that can help.
    -ls6v

    I've been able to get it working with some of those changes along with changes in the JSP. I think it's a setting or two in the JSP that'll allow the program to run correctly.
    I have a list and it's returned like what you suggested. A day or two ago I tried to move the outputtext outside of the facet tag but nothing would print, I know believe that's related to the following setting in the JSP:
    rows="0" in the <h:dataTAble tag
    Unfortunately the dataTAble isn't displaying the values correctly. It prints all of the values (Strings) in the list on each row and it make a new row for the number of items in the list.......... ???
    Here's what it's printing to the screen (the table):
    ===================
    == [asdasd], [sddfdfd] ==
    ===================
    ===================
    == [asdasd], [sddfdfd]==
    ===================
    what it should print:
    ============
    == [asdasd] ==
    ============
    ============
    == [sddfdfd] ==
    ============
    My code:
    public List gettest()
              List li = new ArrayList();
              li.add("asdasd");
              li.add("affffd");
              return li;
              }JSP
    <h:dataTable border="1" columnClasses="list-column-left"
        headerClass="list-header"
        rowClasses="list-row-odd"
        id="table"
        rows="0"
        value="#{NameBean.test}"
        var="data">
    <h:column>
    <f:facet name="header">
    <h:outputText value="test"/>
    </f:facet>
    <h:outputText value="#{NameBean.test}" style="" rendered="true" escape="false"/>
    </h:column>
    </h:dataTable>

  • How can I display XSLT transformer errors on a web page ?

    Hi,
    I have some JSP pages that access DB, create an XML based on DB data and then transform it into HTML through an XSLT stylesheet. Developing the XSL code it's easy to make mistakes and generate errors on trasformation, but what I receive on the web page is only a "Could not compile stylesheet" TransformerConfigurationException, while the real cause of the error is displayed only on tomcat logs. This is the code for transformation:
    static public void applyXSLT(Document docXML, InputStream isXSL, PrintWriter pw) throws TransformerException, Exception {
            // instantiate the TransformerFactory.
            TransformerFactory tFactory = TransformerFactory.newInstance();
            // creates an error listener
            XslErrorListener xel = new XslErrorListener();
            // sets the error listener for the factory
            tFactory.setErrorListener(xel);
            // generate the transformer
            Transformer transformer = tFactory.newTransformer(new SAXSource(new InputSource(isXSL)));
            // transforms the XML Source and sends the output to the HTTP response
            transformer.transform(new DOMSource(docXML), new StreamResult(pw));
    }If an exception is thrown during the execution of this code, its error message is displayed on the web page.
    This is the listener class:
    public class XslErrorListener implements ErrorListener {
        public XslErrorListener() {
        public void warning(TransformerException ex) {
            // logs on error log
            System.err.println("\n\nWarning on XEL: " + ex.getMessage());
        public void error(TransformerException ex) throws TransformerException {
            // logs on error log
            System.err.println("\n\nError on XEL: " + ex.getMessage());
            // and throws it
            throw ex;
        public void fatalError(TransformerException ex) throws TransformerException {
            // logs on error log
            System.err.println("\n\nFatal Error on XEL: " + ex.getMessage());
            // and throws it
            throw ex;
    }When I have an error in the XSL stylesheet (for examples a missing closing tag), I can find on tomcat logs the real cause of the error:
    [Fatal Error] :59:10: The element type "table" must be terminated by the matching end-tag "</table>".
    Error on XEL: The element type "table" must be terminated by the matching end-tag "</table>".but on my web page is reported just the TransformerConfigurationException message that is:
    "Could not compile stylesheet".
    How can I display the real cause of the error directly on the web page?
    Thanks,
    Andrea

    This code is part of a bigger project that let developers edit XSL stylesheets through a file upload on the system and we can't impose the use of any tool for checking the xsl. So, I need to display the transformer error on the web page.I see. This code is part of an editorial/developmental tool for developers to create and edit XSL stylesheets.
    As part of the editorial process, XSL errors during editing can be considered a normal condition. In other words, it is normal to expect that the developers will generate XSL errors as they are developing stylesheets.
    In this light, handling the XSL transformation errors is a business requirement that you need to handle. Using the Java Exceptions mechanisms, e.g. try / catch are inappropriate to handle business requirements, in my opinion.
    I suggest that you look at how you handle the occurence of XSL errors differently than what you currently have. You need to:
    (1) capture the Transformation exception on the server;
    (2) extract the message from the exception and put it into a message that can be easily understood by the user;
    The current error message that you have going to the web browser is not useful.
    And you should not have the Transformation exception sent to the web browser either.
    What you are attempting to do with the exception is not appropriate.
    Handle the Transformation exception on the Business tier and use it to create a useful message that is then sent to the Presentation tier. In other words, do not send Java exceptions to web browser.
    />

Maybe you are looking for

  • JMS Bridge not Working

    Hi, I have a weblogic 9.2 running one application. I what that application to post messages on a internal JMS queue. That message gets fw to a Weblogic 8 JMS queue. To achieve this I created a JMS Bridge with the Weblogic 8 destination, and the Weblo

  • Need help on creating a pivot

    Hi Gurus, I am requirement to create a pivot table. I have managed to create part of it but need your help in completing it. The sample picture is available in the link below, https://www.dropbox.com/s/1wqht2gjfpux62v/Pivot_sample.JPG I have been abl

  • "Invalid key" error --- License Key for system NSP

    Hello SDN Team, I have successfully installed the NW04 ABAP Sneak Preview. Now I'm trying to get a license for it at http://www.sap.com/solutions/netweaver/minisap.epx. I enter all the data, check the License Agreement, hardware key from Transaction

  • Can't burn data to a CD because iMac doesn't recognize CD has been inserted.  Also, can't eject.  What to do?

    Can't burn data to a CD because iMac doesn't recognize that a CD has been inserted.  Also, it won't let me eject the disk. How do I get my iMac to let me burn the data to the CD and eject the disk?   Finder currently has 2 "Untitled CD"s listed in it

  • Uninstall PSE 10 manually due to windows re-install?

    I have Photoshop Elements and Premiere Elements 10 installed on my "D" drive - windows 7 64 bit is installed on C.  I had to reinstall windows due to a crash and now have to reinstall all of my programs that I had installed on the other drive in orde