Connecting Tech Pros Worldwide Forums | Help | Site Map

Dynamic Background Color

bennett.sean@gmail.com
Guest
 
Posts: n/a
#1: Nov 7 '05
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


Evertjan.
Guest
 
Posts: n/a
#2: Nov 7 '05

re: Dynamic Background Color


wrote on 07 nov 2005 in comp.lang.javascript:
[color=blue]
> 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.[/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)

bennett.sean@gmail.com
Guest
 
Posts: n/a
#3: Nov 7 '05

re: Dynamic Background Color


Awesome, thanks.

Evertjan.
Guest
 
Posts: n/a
#4: Nov 7 '05

re: Dynamic Background Color


wrote on 07 nov 2005 in comp.lang.javascript:
[color=blue]
> Awesome, thanks.
>[/color]

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

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

Dr John Stockton
Guest
 
Posts: n/a
#5: Nov 8 '05

re: Dynamic Background Color


JRS: In article <Xns9707E7E5BD933eejj99@194.109.133.242>, dated Mon, 7
Nov 2005 21:47:46, seen in news:comp.lang.javascript, Evertjan.
<exjxw.hannivoort@interxnl.net> posted :
[color=blue]
>[please always quote on usenet, this is not email][/color]

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>.
Evertjan.
Guest
 
Posts: n/a
#6: Nov 9 '05

re: Dynamic Background Color


Dr John Stockton wrote on 08 nov 2005 in comp.lang.javascript:
[color=blue]
> JRS: In article <Xns9707E7E5BD933eejj99@194.109.133.242>, dated Mon, 7
> Nov 2005 21:47:46, seen in news:comp.lang.javascript, Evertjan.
> <exjxw.hannivoort@interxnl.net> posted :
>[color=green]
>>[please always quote on usenet, this is not email][/color]
>
> Please don't give the impression that proper quoting in Mail is any less
> desirable than in News.
>[/color]

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)

Closed Thread