473,324 Members | 2,248 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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

Dec 23 '05 #1
1 1323
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"
Dec 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Patrice | last post by:
Hi, I'm trying to use a javascript function passing a vb variable. I don't understand why it doesn't work. Can someone help me? Thanks in advance. Here is my javascript function used to...
3
by: Jeannie | last post by:
Can anyone help me adjust this code so that it works in Netscape 4.x? I have am developing a website for a restaurant and the menu page has menus for lunch and dinner. Two images work as tabs, so...
2
by: Mark Preston | last post by:
Its perhaps a bit early to ask, since I'm still doing the page design and haven't got down to the coding yet, but I wonder if anyone can help with a bit of a question. To lay the groundwork, a...
2
by: Jackson Yap | last post by:
can someone kind enough to help me look at the attached html and js file? Why is it that the javascript menu could not work at www.apchosting.net but could work at...
8
by: Cat | last post by:
Greetings, I have an old javascript effect that was running on some of my sites for quite long, working fine in Netscape (up to 4.75) and IE. It still works in the newer IEs, but not in the new...
4
by: johkar | last post by:
When the output method is set to xml, even though I have CDATA around my JavaScript, the operaters of && and < are converted to XML character entities which causes errors in my JavaScript. I know...
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
10
by: jojobar | last post by:
Hello, I am trying to use vs.net 2005 to migrate a project originally in vs.net 2003. I started with creation of a "web site", and then created folders for each component of the site. I read...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.