|
sarge -> RE: VBScript question (1/10/2002 18:24:04)
|
Hi Ginnie- These are the relevant bits of HTML, extracted from the page. (The page itself is rather large) 1.) This is the SCRIPT <SCRIPT language="VBSCRIPT"> sub document_onclick Select case window.event.srcElement.id Case "boxed" if histable.border = "4" then histable.border = "0" else histable.border = "4" end if Case "bright" if histable.background-color = "#FFFF66" then histable.background-color = "#FFFFCC" else histable.background-color = "#FFFF66" end if Case else exit sub End select end sub </SCRIPT> 2.) This is the table 'histable': <table id=histable width="100%" border="<%If FP_FieldVal(fp_rs,"trad_boxed")= "True" then response.write "4" else response.write "0"%>" cellspacing="0" cellpadding="3" height="20" style="background-color: <%If FP_FieldVal(fp_rs,"trad_bright")= "True" then response.write "#FFFF66" else response.write "#FFFFCC"%>" > 3.) These are the checkboxes: <input id=boxed type="<%If FP_FieldVal(fp_rs,"trad_boxed")= "True" then response.write "hidden" else response.write "checkbox"%>" name="boxed" value="ON" <%If FP_FieldURL(fp_rs,"trad_boxed") = "True" then response.write " checked"%>> <input id=bright type="<%If FP_FieldVal(fp_rs,"trad_bright")= "True" then response.write "hidden" else response.write "checkbox"%>" name="bright" value="ON" <%If FP_FieldURL(fp_rs,"trad_bright") = "True" then response.write " checked"%>> ------------------------------------ Just in case you're wondering, the object of the page is this: The site has a directory of computer traders in London, and this page allows traders to 'play with' the way that their details are presented. Its a bit like yellow pages (where you can box entries, change the font size, the background color etc.). Checkboxes get hidden when the trader takes up an option (for a year). ------------------------------------ Anyway, thanks in advance, Sarge
|
|
|
|