cempasha
asked on
asp in .js file
hi there.
i have a form and retrieves some functions from .js file. what i'm trying to do is make the radio button checked if the value is 1.
my current code is
txtHTML = '<table><tr><td class="style19">Caching Server required</td><td class="style19"><input id="optCacheServer" name="optCacheServer" type="radio" value="1" onChange="setRec();">Yes<i nput id="optCacheServer" name="optCacheServer" type="radio" value="0" onChange="setRec();" >No</td></tr></table>';
what i would like to do is actually
txtHTML = '<table><tr><td class="style19">Caching Server required</td><td class="style19"><input id="optCacheServer" name="optCacheServer" type="radio" value="1" <% if CSR2 = 1 then %> checked <% end if %> onChange="setRec();">Yes<i nput id="optCacheServer" name="optCacheServer" type="radio" value="0" <% if CSR2 = 0 then %> checked <% end if %> onChange="setRec();" >No</td></tr></table>';
however this doesnt work as it doesnt seem to accept asp codes. any ideas how i can achieve it ? thanks in advance
i have a form and retrieves some functions from .js file. what i'm trying to do is make the radio button checked if the value is 1.
my current code is
txtHTML = '<table><tr><td class="style19">Caching Server required</td><td class="style19"><input id="optCacheServer" name="optCacheServer" type="radio" value="1" onChange="setRec();">Yes<i
what i would like to do is actually
txtHTML = '<table><tr><td class="style19">Caching Server required</td><td class="style19"><input id="optCacheServer" name="optCacheServer" type="radio" value="1" <% if CSR2 = 1 then %> checked <% end if %> onChange="setRec();">Yes<i
however this doesnt work as it doesnt seem to accept asp codes. any ideas how i can achieve it ? thanks in advance
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
-- move your javascript content directly into your .asp file so it will process as you want (probably the easiest thing to do)
comment. however all seems great. thanks again