I am trying to use javascript with server controls.
Aim
To make my panel visible on mouseover event of text box(asp control)
Problem areas
new to javascript and asp.net.
getting javascript errors at run time
went thru all possible solutions from different forums but not able to customize them accordingly.
The code runs on this ASP.NET Control
<asp:TextBox ID="TextBox1" runat="server"
ontextchanged="TextBox1_TextChanged"
onmouseover="enablepanel()"
Width="76px"
Text="--SELECT--">
</asp:TextBox>
Tried these scripts
function enablepanel(sender, target) {
document.getElementById(target).removeAttribute("disabled");
}
function enablepanel() {
var id = $get("<%=Panel1.ClientID %>");
if (id != null) id.disabled = false;
$get("#<%= ButtonSave.ClientID%>").removeAttr("disabled");
var controls = document.getElementById("<%=Panel1.ClientID%>");
controls.disabled = false;
}
function enablepanel() {
document.getElementById(div1).disabled = "false";
}
Its not working.
Request
if possible try to make it simple as we call functions in html when we use javascript otherwise just go with the solution.
{}to make it readable. Include your event handler, the code that assigns the handler, and the related bit of HTML. And tell us what errors you're getting. And are you trying to make your panel "visible" like your question says or "enabled" like your code is trying to do?