Click to See Complete Forum and Search --> : changing the readonly property of a text box!


pelegk1
06-11-2003, 02:42 AM
i have this code :
<INPUT TYPE="text" name=cityName id=cityName readOnly onclick="alert();changeRadio(raCity,adress.raMahoz,1)">

i want on clicking to change the read only property so i will be able to write in the text box!
how can i do that?
thnaks in advance
Peleg

niroshan
06-11-2003, 03:56 AM
Hi,
Try this code,

///////////////
<HTML>
<HEAD>
<TITLE> test </TITLE>
</HEAD>
<script language="javascript">

function xx()
{
document.getElementById("cityName").readOnly=false;
}
</script>
<BODY>
<INPUT TYPE="text" name=cityName id=cityName readOnly value="ff" onclick="xx()">
</BODY>
</HTML>
////////////////////

regards,
Niroshan