question on javascript layers in aspnet

Discussion in 'ASP General' started by tigozilla, Dec 23, 2005.

  1. tigozilla

    tigozilla Guest

    I am developing a website with ASP.NET /C#. The items will render
    automatically based on their "catID". So that the URL will look similar
    to the example:

    http://www.domain.com/index.aspx?catID=1
    http://www.domain.com/index.aspx?catID=2
    http://www.domain.com/index.aspx?catID=3

    I'm using a javascript layer to display some items on this page.
    However, I want this layer to show only when caID=1. I'm a newbie when
    it comes to javascript. So, I was trying to get the url using
    "document.url" and use if statement to show/hide the layer. But that
    didn't work. Can anybody help or provide some useful hints

    Thank you in advance
    tigo
     
    tigozilla, Dec 23, 2005
    #1
    1. Advertising

  2. tigozilla wrote:
    > I am developing a website with ASP.NET /C#.


    There was no way for you to know it, but this is a classic asp newsgroup.
    While you may be lucky enough to find a dotnet-knowledgeable person here who
    can answer your question, you can eliminate the luck factor by posting your
    question to a group where those dotnet-knowledgeable people hang out. I
    suggest microsoft.public.dotnet.framework.aspnet

    > The items will render
    > automatically based on their "catID". So that the URL will look
    > similar to the example:
    >
    > http://www.domain.com/index.aspx?catID=1
    > http://www.domain.com/index.aspx?catID=2
    > http://www.domain.com/index.aspx?catID=3
    >
    > I'm using a javascript layer to display some items on this page.
    > However, I want this layer to show only when caID=1. I'm a newbie when
    > it comes to javascript. So, I was trying to get the url using
    > "document.url" and use if statement to show/hide the layer. But that
    > didn't work. Can anybody help or provide some useful hints
    >

    :)
    Wow! This question is doubly off-topic! ;-)
    ASP/ASP.Net is server-side technology. It simply generates html to be sent
    to the client. Once the page is displayed in the client, we are now in the
    realm of client-side scripting (which, in IE, can use either javascript or
    vbscript). A more appropriate newsgroup for this question would be one of
    the dhtml newsgroups, or the microsoft.public.scripting.jscript group.

    Having said all that, the property you are looking for is the
    document.location.search property, which is documented here:
    http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/search.asp

    You can find the MS DHTML reference at
    http://msdn.microsoft.com/workshop/author/dhtml/dhtml_node_entry.asp

    Follow-ups should go to the .scripting.jscript group.

    Bob Barrows

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Dec 23, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gary Nelson

    Upgrade from aspnet 1.1 to aspnet 2.0

    Gary Nelson, Oct 14, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    508
    Gary Nelson
    Oct 14, 2005
  2. Replies:
    7
    Views:
    687
    Juan T. Llibre
    Mar 23, 2007
  3. Brian Schuth
    Replies:
    0
    Views:
    297
    Brian Schuth
    Sep 8, 2003
  4. Alfred Sehmueller
    Replies:
    0
    Views:
    284
    Alfred Sehmueller
    Feb 20, 2004
  5. HD
    Replies:
    0
    Views:
    88
Loading...

Share This Page