Solved

Display modal window while page load

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how can display objects ? 3 18
Entity Framework 7 27
Message not shown 5 27
C# MVC and a global static factory that never dies 4 42
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
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…
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…

932 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

10 Experts available now in Live!

Get 1:1 Help Now