wolframjam
asked on
clinet side script doesn't work
hi guys,
I am new with asp.net.
I have the following code:
<%@ Page Language="VB" %>
<script runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Button1.Attributes.Add("on mouseover" , _
"javascript:alert('ALERT ALERT!!!')")
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server" ID="Form1">
<asp:Button id="Button1" runat="server" Font-Bold="True"
Font-Names="Verdana" Font-Size="Larger"
Text="Click Me!" Enabled="true"></asp:Butto n>
</form>
</body>
</html>
When I try to view it in the browser the alert box does not appear on the "onmouseover" event.
When I build it and browse it in the IDE it works fine.
Please help me,
Thanks
I am new with asp.net.
I have the following code:
<%@ Page Language="VB" %>
<script runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Button1.Attributes.Add("on
"javascript:alert('ALERT ALERT!!!')")
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server" ID="Form1">
<asp:Button id="Button1" runat="server" Font-Bold="True"
Font-Names="Verdana" Font-Size="Larger"
Text="Click Me!" Enabled="true"></asp:Butto
</form>
</body>
</html>
When I try to view it in the browser the alert box does not appear on the "onmouseover" event.
When I build it and browse it in the IDE it works fine.
Please help me,
Thanks
i've copied your code and paste it in a test page and in IE 6 it was working perfect
what browser do you test it under ?
B..M
what browser do you test it under ?
B..M
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank You All For Help.
try with the RegisterStartupScript method have a look at this url
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/aspnet-usingjavascript.asp
I hope that this helps you.
regards,
venki