Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

clinet side script doesn't work

Posted on 2004-05-01
4
Medium Priority
?
297 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
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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Integration Management Part 2

782 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