Solved

clinet side script doesn't work

Posted on 2004-05-01
4
281 Views
Last Modified: 2010-04-07
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("onmouseover", _
           "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:Button>
    </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
0
Comment
Question by:wolframjam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 21

Expert Comment

by:tovvenki
ID: 10967455
Hi,

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
0
 
LVL 28

Expert Comment

by:mmarinov
ID: 10968769
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
0
 
LVL 30

Accepted Solution

by:
SteveGTR earned 500 total points
ID: 10970267
Check to make sure that you do not have scripting disabled.
0
 

Author Comment

by:wolframjam
ID: 10971605
Thank You All For Help.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question