Click to See Complete Forum and Search --> : Changed Background color


Greelmo
06-18-2003, 11:33 PM
In a form, i have the user specify the bgcolor via radio buttons. when they submit and it goes to the next page, how do i make the bgcolor of the document = their color?

khaki
06-19-2003, 08:58 AM
hi Dex...

assuming that your form looks something like:


<form name="form1" method="post" action="passcolor.asp">
<input type="radio" name="radiobutton" value="cc0000">Red<br>
<input type="radio" name="radiobutton" value="ffffff">White<br>
<input type="radio" name="radiobutton" value="006699">Blue<br>
<input type="submit" name="Submit" value="Submit">
</form>


...then the next page ("passcolor.asp") could look like this:


<%
dim passColor
passColor = request.form("radiobutton")
%>
<html>
<head>
<title>background color</title>
</head>
<% response.write("<body bgcolor='#" & passColor & "'>") %>
cowabunga!
</body>
</html>


it's primitive....
but it works :)

is that sorta what you were looking for?
;) k

Greelmo
06-19-2003, 02:48 PM
that's it! thanks!