help with this pls
-
could someone help me with this please. How can i accept both a background and foreground color. Currently either 1 or the other is accepted and rendered. here is the code. from what i understand its an if statement that will do this. thanks in advance. //---------------------------------------------------------------- // Variable Initialization //---------------------------------------------------------------- var bgcolor=String(Request("bgcolor")); bgcolor = bgcolor == "undefined" ? "white" : bgcolor; var fgcolor=String(Request("fgcolor")); fgcolor = fgcolor == "undefined" ? "black" : fgcolor; var this_url,this_color,this_variable; //---------------------------------------------------------------- // Page Assembly //---------------------------------------------------------------- this_parameter = "fgcolor"; label("Foreground Color"); start_table(); this_color="red"; cell(this_color,url(this_parameter,this_color)); this_color="green"; cell(this_color,url(this_parameter,this_color)); this_color="blue"; cell(this_color,url(this_parameter,this_color)); end_table(); this_parameter = "bgcolor"; label("Background Color"); start_table(); this_color="yellow"; cell(this_color,url(this_parameter,this_color)); this_color="gray"; cell(this_color,url(this_parameter,this_color)); this_color="purple"; cell(this_color,url(this_parameter,this_color)); end_table(); label("Results"); show_results(); //---------------------------------------------------------------- // UI Helper Functions //---------------------------------------------------------------- function url(param,color) { var baseURL = "default.asp"; baseURL += "?" + param; baseURL += "=" + color; return(baseURL); } function start_table() { Response.Write(""); } function end_table() { Response.Write("
"); } function cell(color,url) { Response.Write(""); Response.Write(""); Response.Write(color); Response.Write(""); Response.Write(""); } function label(text) { Response.Write("
"); Response.Write(""); Response.Write(text + ":"); Response.Write(""); } function show_results() { Response.Write("