Hey still didnt get the solution...even this thing is not working...
getting the error "object required" at the line
"if(document.getElementById('rbupdated').checked== true ||
document.getElementById('rbmostused')==true)"....
It seems it is not able to identify the radio button rbupdated...also
it seems "checked" property is not thr, because whn i pressed
ctr+space baar after ('rbupdated') , I didnt get "checked " in the
list of available properties
Przemek Ptasznik wrote:
Bipin napisal(a):
I think you can do this by javascript in client side code.
try writing the code inside <FORMor make this as a function and call
it from Form_Onload.
<script language="Javascript>
if (form.getelimentid('radio1').checked == true ||
form.getelimentid('radio2').checked == true)
textboxt.text = 't';
else
textboxt.text = 'f';
endif
</script>
this code doesn't seems to work.
You can do what you want to in two ways:
1) on the client-side (with javascript):
use "document.getElementById('radio1').checked" instead of
"form.getelimentid('radio1').checked"
2) on the server-side :
First you must convert textbox (actually html input element) into a
html server control. Just add to this element runat="server" and id
attributes.
Second - write event handler for radioButton event that will set
textBox's Text property.
--
PP