Solved

Display modal window while page load

Posted on 2010-11-21
5
523 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article discusses how to create an extensible mechanism for linked drop downs.
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…

717 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