Solved

Display modal window while page load

Posted on 2010-11-21
5
518 Views
Last Modified: 2012-05-10
I need to display a modal window (jquery thickbox or something else) only while my page or another control is loading, and in my web application (C#, .Net 2.0) there could be some delays in getting the data, in several situations.
 I cannot use Ajax Extender ModalPopup, since I don't have (yet) the 3.5 version of .Net on my web server.
How should I do this in javascript? Thanks
0
Comment
Question by:danielivanov2
  • 2
  • 2
5 Comments
 
LVL 31

Accepted Solution

by:
Marco Gasi earned 350 total points
ID: 34185671
You can use lightbox lib or prototype and scriptaculous: it's very simple and customizable. You can find it here: http://www.michaelminella.com/javascript/prototype-script.aculo.us-lightbox.html

Cheers
0
 

Author Comment

by:danielivanov2
ID: 34185681
Ok, I'll study that page. Should I fire the event in an overriden PreInit Page method and close it in "Page_Load?
0
 
LVL 3

Expert Comment

by:abdkhlaif
ID: 34185688
take a look at window.showModalDialog method:

<script language=javascript>
	function TestShowModal(){
		var WinSettings = "status:no; center:yes; resizable:no; dialogHeight:200px; dialogWidth:200px; help:no;"
		window.showModalDialog("http://www.experts-exchange.com", "", WinSettings);
	}
</script>

Open in new window

0
 
LVL 31

Expert Comment

by:Marco Gasi
ID: 34185690
I'm sorry, but I never did such a thing: I can only say you can try. This is the reason because of I suggested lightbox: IMHO it's the most easy lightbox to implement.

Cheers
0
 

Author Closing Comment

by:danielivanov2
ID: 34185718
This is what I was looking for, except the part with displaying the window only on page load, that I should investigate thereafter
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

821 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