Forum Moderators: open

Message Too Old, No Replies

HTML styles and ASP

         

NotAFanOfPrograming

4:27 pm on Aug 24, 2004 (gmt 0)

10+ Year Member



I have an ASP page that has html text fields. This pages submits info to a different ASP page and on this 2nd ASP page i want to test the background color of the text field from the first ASP page. Then depending on the color the text fields are, I want that to show the same background color on the 2nd page and then be submitted into a database.

Possible? confusing..yes.

Thanks

mattglet

9:50 pm on Aug 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You will need to store the background colors in some hidden forms, and check the values on your 2nd ASP page. A little javascript onSubmit function should do the trick for you.

NotAFanOfPrograming

11:59 am on Aug 25, 2004 (gmt 0)

10+ Year Member



well i have javascript function on each field that changes the color when it is clicked. How can i store the current or new color to a hidden form value for ASP?

mattglet

12:13 pm on Aug 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In that JS function, also assign a value to a corresponding hidden field:

document.forms['yourform'].color1.value = 'colorthatwaschosen';

and in your form:

<input type = "hidden" name = "color1" value = "">

On your second page, just check Request.Form("color1") for the value.

That should get you in the right direction.