My guess you have a problem with changed id of the control....
There are several solutions but in your case you can use "this"
<script language="javascript" type="text/javascript">
function functionName(cnt)
{
alert(cnt.id);
}
</script>
Date: <input runat="server" id="TextBox1" type="text"
onfocus="javascript
:functionName(this);"/>
PS: also you can always use <%=TextBox1.ClinetID%>
PPS: Next try to point to a problem so we do not have to guess... :)
George.
"iHavAQuestion" <iH***********@discussions.microsoft.comwrote in message
news:66**********************************@microsof t.com...
How can I use this same javascript in the asp.net 2.0, where I have a
master
page.
<html >
<script language="javascript" type="text/javascript">
function functionName(cnt_id)
{}
function functionName2
{}
</script>
<form id="form1" runat="server">
<body>
Date: <input runat="server" id="TextBox1" type="text"
onfocus="javascript:functionName('TextBox1')"/>
</body>
</form>
</html>