Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   question on javascript layers in aspnet (http://www.velocityreviews.com/forums/t800305-question-on-javascript-layers-in-aspnet.html)

tigozilla 12-23-2005 07:37 AM

question on javascript layers in aspnet
 
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


Bob Barrows [MVP] 12-23-2005 11:37 AM

Re: question on javascript layers in aspnet
 
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/a...ies/search.asp

You can find the MS DHTML reference at
http://msdn.microsoft.com/workshop/a...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"




All times are GMT. The time now is 08:40 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.