473,386 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

JAVASCRIPT ALERT

I have a user control called InsightIntegMenu.ascx

here is the Code
Control Language="C#" AutoEventWireup="true" CodeFile="InsightIntegMenu.ascx.cs" Inherits="InsightIntegMenu" %>

<asp:Menu ID="Menu1" runat="server" Height="110px" BackColor="#ffffff" DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="10" Font-Bold="true" ForeColor="#FFFFFF" StaticSubMenuIndent="10px" StaticSelectedStyle-ItemSpacing="2px" >
<Items>
<asp:MenuItem Text="Status Report" NavigateUrl="~/StatusReport.aspx" Value="StatusReport"></asp:MenuItem>
</Items>
</asp:Menu>

now In My ASPX Page I Have This Part Of the Code


<%@ Register TagPrefix="Menu" TagName="InsigtMenu" Src="~/InsightIntegMenu.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<form id="form1" runat="server">
<table cellpadding="0" cellspacing="0" width="800px" style="HEIGHT: 100%" border="0" align="center">
<tr valign="top">
<td style="WIDTH: 20%; height:100%" align="left"><Menu:InsigtMenu runat="server" ID="insightMenu" ></td>
<td>asp:LinkButton runat="server" ID="lnkNew" Text="New" Font-Bold="true" Font-Size="13px" Font-Underline="false" ForeColor="#FFFFFF" OnClick="lnkNew_Click"></asp:LinkButton></td>
</table>
</asp:Panel>
.....and more Code

NOW HERE IS THE PROBLEM
I have an alert for a button click
string strMessage = "The data was saved.";




//finishes server processing, returns to client.
string strScript = "<script language=JavaScript>";
strScript += "alert('" + strMessage + "' )";
strScript += "</script>";


Page.RegisterStartupScript("clientScript", strScript);

this alert works fine all the time, However if the user control is a .net menu the Page will Disappear (the alert will come up first then when you hit Ok on the alert you go back to the parent Page) why is going on? i spent a lot of time on this please help me..THIS PNLY HAPPEN IF THE USER CONTROL IS A MENU
Jul 18 '07 #1
1 1283
kenobewan
4,871 Expert 4TB
Please refrain from using this type of title (the one that said weird problem etc !!!!!!!!!!!). Thanks.

MODERATOR
Jul 19 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Gowhera Hussain | last post by:
Use This for Learning Only .... Do Not Try To Act Smart HACKING WITH JAVASCRIPT Dr_aMado Sun, 11 Apr 2004 16:40:13 UTC This tutorial is an overview of how javascript can be used to bypass...
11
by: Vincent van Beveren | last post by:
Hi everyone, I have the following code using inheritence The important part is the function getName(). The result should alert 'John Doe': function First(name) { this.name = name; ...
7
by: Bert Visscher | last post by:
Hello everyone, I would like to let visitors of my website be able to go directly to a desired page, by using a URL like www.example.com?progname. I thought I could do this as follows: <html>...
14
by: tshad | last post by:
I posted this on the asp.net group, also. I wasn't sure whether this was an asp.net problem or a javascript problem. I have a page that was originally created from a program I found on the net...
9
by: tshad | last post by:
This is from my previous post, but a different issue. I have the following Javascript routine that opens a popup page, but doesn't seem to work if called from an asp.net button. It seems to work...
1
pbmods
by: pbmods | last post by:
VARIABLE SCOPE IN JAVASCRIPT LEVEL: BEGINNER/INTERMEDIATE (INTERMEDIATE STUFF IN ) PREREQS: VARIABLES First off, what the heck is 'scope' (the kind that doesn't help kill the germs that cause...
8
by: Pratik Patel | last post by:
Hello, I used innerHTML to assign HTML content. but in my HTML page content have also some javascript function and it will run when page load. bu when HTML code assgin thru innerHTML then this...
12
by: pantagruel | last post by:
Hi, I'm thinking of making a WScript based JavaScript library, I can think of some specific non-browser specific scripting examples that should probably make it in, like Crockford's little...
6
The1corrupted
by: The1corrupted | last post by:
I don't know if this is the right forum or not, but right now, my Javascript, that is embedded in PHP, is not working! It works everywhere else but not here. HELP!! <?php $soldnumber=$_POST;...
9
by: Matthew Wells | last post by:
OK, I've narrowed down the problem. This works when in the aspx page <script type="text/javascript" > function btnFirst_Click() { alert("Hello");...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.