Hi everybody,
I have one problem, and I hope some of you guys can help me with this.
I`m working in C# (Visual Studio 2005)...writing simple web site .
I place grid on Default.aspx and put one textbox in it.
On the other side, on Default.aspx.cs page I write simple method which dynamicly generate Radio Button on page..(code bellow):
[code=cpp]
protected void ActivateScript( )
{
Response.Write( "<tr><td> <input type=\"radio\" value=\"1\" name=\"RadioBtn 1\" id=\"radiobtn_\ " onClick=\"rbCha nge('TextBox1', true)\"> </td></tr>");
}[/code]
On Default.aspx part...I added jscript with function I want to call from aspx.cs file:
[code=javascript]
<script language="javas cript" type="text/javascript">
function rbChange(tbId, state){
var textBox = document.getEle mentById(tbId);
tb.disabled = state;
}
</script>[/code]
Jscript should set the textbox in read only mode when user click on RadioBtn...howe ver..jscript function does not work at all...I don`t know what`s going on..
Of course..from Default.aspx page I call <%ActivateScrip t();%>
someone have some idea?
I have one problem, and I hope some of you guys can help me with this.
I`m working in C# (Visual Studio 2005)...writing simple web site .
I place grid on Default.aspx and put one textbox in it.
On the other side, on Default.aspx.cs page I write simple method which dynamicly generate Radio Button on page..(code bellow):
[code=cpp]
protected void ActivateScript( )
{
Response.Write( "<tr><td> <input type=\"radio\" value=\"1\" name=\"RadioBtn 1\" id=\"radiobtn_\ " onClick=\"rbCha nge('TextBox1', true)\"> </td></tr>");
}[/code]
On Default.aspx part...I added jscript with function I want to call from aspx.cs file:
[code=javascript]
<script language="javas cript" type="text/javascript">
function rbChange(tbId, state){
var textBox = document.getEle mentById(tbId);
tb.disabled = state;
}
</script>[/code]
Jscript should set the textbox in read only mode when user click on RadioBtn...howe ver..jscript function does not work at all...I don`t know what`s going on..
Of course..from Default.aspx page I call <%ActivateScrip t();%>
someone have some idea?
Comment