473,406 Members | 2,439 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,406 software developers and data experts.

Dynamic Background Color

Hi, what I would like to do with html / javascript is the following:

The url is something like: htmlfile.htm?color=blue

I want to grab the parameter "color=blue" and assign it to the
background color.

My problem is I don't know how to get the parameter via html /
javascript.

In ASP it's <%Request("color")%> but after searching with Google I
haven't come up with anything for html / javascript.

Your help is greatly appreciated.

Thanks,

Sean

Nov 7 '05 #1
5 1511
wrote on 07 nov 2005 in comp.lang.javascript:
Hi, what I would like to do with html / javascript is the following:

The url is something like: htmlfile.htm?color=blue

I want to grab the parameter "color=blue" and assign it to the
background color.


alert(location.search)

shows: ?color=blue

<http://www.devguru.com/Technologies/ecmascript/quickref/location.html>

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Nov 7 '05 #2
Awesome, thanks.

Nov 7 '05 #3
wrote on 07 nov 2005 in comp.lang.javascript:
Awesome, thanks.


[please always quote on usenet, this is not email]

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Nov 7 '05 #4
JRS: In article <Xn********************@194.109.133.242>, dated Mon, 7
Nov 2005 21:47:46, seen in news:comp.lang.javascript, Evertjan.
<ex**************@interxnl.net> posted :
[please always quote on usenet, this is not email]


Please don't give the impression that proper quoting in Mail is any less
desirable than in News.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
The Big-8 newsgroup management is attempting to reorganise its questionable
practices while retaining an elitist hegemony. Read <URL:news:news.groups>.
Nov 8 '05 #5
Dr John Stockton wrote on 08 nov 2005 in comp.lang.javascript:
JRS: In article <Xn********************@194.109.133.242>, dated Mon, 7
Nov 2005 21:47:46, seen in news:comp.lang.javascript, Evertjan.
<ex**************@interxnl.net> posted :
[please always quote on usenet, this is not email]


Please don't give the impression that proper quoting in Mail is any less
desirable than in News.


But it is, John, as you could(!) have an understanding with the other party
not to quote in a one-to-one email sequence.

On usenet you would need to have that understanding with all end even
future NG-readers, which is impossible.
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Nov 9 '05 #6

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

Similar topics

5
by: K | last post by:
I have found a script online that I want to use (I am new to PHP). It creates dynamic images based on the text that you pass it. However, no matter how I try, I can't get anything other than a...
4
by: mike eli | last post by:
Hi, I have several absolute positioned elements inside an absolute positioned DIV. I would like one of the nested elements to have a dynamic width. I set it's left and right attributes to 5, so...
3
by: JOSEPHINE ALVAREZ | last post by:
I have this code that I want to use to do a rollover. However, because the company I am doing it for is continually changing the text, I want to be able to use dynamic text to change the text on...
4
by: Tom Wisnowski | last post by:
Hello all, Here is a simple example of what I'm doing... Create a ASPX page Add a PlaceHolder(plch) and a Button(btn) to the page. In the code behind on Page_load add the following......
1
by: tribal boy | last post by:
Guys, I am using a dynamic menu which uses xml,xsl a css file and javascript. This works fine when there are no server controls around or underneath it. The problem is whenever the menu...
0
by: Vidula | last post by:
I am using the menu control in ASP.NET using VS2005. I want to change the background color of the dynamic menu when the mouse hovers over that menu item. This works fine when the background color...
1
by: mht7 | last post by:
I'm newbie to javascript and I did an extensive search on this site and couple of others looking for directions. I'm attempting to write some custom javascript for collapsing the tables and fit it...
1
by: gau.tai | last post by:
I have a form in which I am generating dynamic fields. I can do this fine, but when I go to validate them there are errors. The non- dynamic fields validate correctly. Below is the html and js. ...
5
by: empiresolutions | last post by:
I'm trying to build a box that i can place content in. This box should dynamically change width and height to accommodate the content inside. I have build out a non-working example here...
2
Frinavale
by: Frinavale | last post by:
I've created a ASP.NET control that displays a "book" of schedules. It dynamically displays scheduling times and allows the user to page through the schedules. It also lets the user edit the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.