Solved

Display modal window while page load

Posted on 2010-11-21
5
508 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 30

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 30

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

705 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now