I am opening the msgbox in asp.net by following code..

if (ds.Tables[0].Rows[0][12].ToString() == "0" )
   Page.ClientScript.RegisterStartupScript(this.GetType(), "Window", "alert('This Suggestion ID is not yet approved to create a case. ');", true);
else if(ds.Tables[0].Rows[0][12].ToString() == "2")
   Page.ClientScript.RegisterStartupScript(this.GetType(), "Window", "alert('Your Suggestion is rejected to create a case. ');", true);
else
   Page.ClientScript.RegisterStartupScript(this.GetType(), "Window", "alert('Please enter a valid Suggestion ID.');", true);

When its running on mozilla browser Message Box title showing The page at http://.... says:

I want to change this title and show my custom title a part from The page at http://.... says:

Any open help me soon.

share|improve this question

feedback

3 Answers

You can't change this title.

The alert box is generated by the browser and the title is not something that can be controlled via javascript.

The best you can do is create your own alert box in javascript (for example using jQuery UI).

See this SO question.

share|improve this answer
feedback

Look at JavaScript alert title header or How to edit a JavaScript alert box title?.

share|improve this answer
I am using JavaScript jquery.. the code is code behind Page.ClientScript.RegisterStartupScript(this.GetType(), "Window", "callAlert();", true); and on the ascx page i have written $(document).ready(function() { $('#ImageButton1').click(function() { jAlert('Please enter a valid Suggestion ID.', 'Case Entry'); }); }); script but the problem is alert box is getting automatically disabled when page is loading fully anyone help me.... how to stop autopost back – Rocky Apr 22 '11 at 12:34
feedback
up vote 0 down vote accepted

Use custom alert message box, for changing the title else you can't change the title

for more details check this link

http://javascript.internet.com/miscellaneous/custom-alert-box.html

share|improve this answer
feedback

Your Answer

 
or
required, but never shown
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.