clinet side script doesn't work

Posted on 2004-05-01
Last Modified: 2010-04-07
hi guys,

I am new with
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
    <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>

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,
Question by:wolframjam
LVL 21

Expert Comment

ID: 10967455

try with the RegisterStartupScript method have a look at this url

I hope that this helps you.

LVL 28

Expert Comment

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 ?

LVL 30

Accepted Solution

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

Author Comment

ID: 10971605
Thank You All For Help.

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

I have developed many web applications with asp & and to add and use a dropdownlist was always a very simple task, but with the new, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on could not pull conte…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

778 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