Solved

modal window in javascript

Posted on 2002-04-17
7
864 Views
Last Modified: 2008-01-09
I'm making a application in which i'm providing user  facility to select the item from the lookups. Everything i can do except making window modal(i.e. unless the top window is closed user can not access parent window which opened the child). I know this can be done using window.showModalDialog but here problem is that i can not submit the page on modal window because it opens the new window for that. (Modal window is supposed to show records page wise for which i need to submit the same page on same window). Therefore  i'm forced to use window.open method. I can not also write in modal window  "<body onblur=window.focus()> because minimizing modal i can access parent.

Have any of you have ever faced the same problem, if yes pls respond back with ur problem, i think it is all happending because microsoft has not provided us much options in window.open method.

Thanx
0
Comment
Question by:tittlejoseph
7 Comments
 

Expert Comment

by:sonthosh
ID: 6947289
hi,
         Even we faced the problem of Modal Window. Our client want the child window to be closed if the parent window is closed.The child window gives us calender to choose a date or detail of a record. So we have to make the child window modal. We faced the same problem as u have faced, we were not able to submit the form. So we wrote a javascript in such a way that if the user click any other screen then window will close itself automatically.

If this logics will work. I can give u the code.



GoodLuck.
0
 

Expert Comment

by:sonthosh
ID: 6947291
hi,
         Even we faced the problem of Modal Window. Our client want the child window to be closed if the parent window is closed.The child window gives us calender to choose a date or detail of a record. So we have to make the child window modal. We faced the same problem as u have faced, we were not able to submit the form. So we wrote a javascript in such a way that if the user click any other screen then window will close itself automatically.

If this logics will work. I can give u the code.



GoodLuck.
0
 

Author Comment

by:tittlejoseph
ID: 6947591
No i dont want in that way, i can do what you are saying. But this will be wrong in case of lookups, may be ok in calendar picker. anyone else?
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

 
LVL 2

Expert Comment

by:VincentWong
ID: 6979823
If you don't want to popup a modal page, how about use iframe to do the task? Just make the lookup page inside the parent page.

Here is a example from oreilly. It would guide you to deal with it.

http://www.oreillynet.com/lpt/a//javascript/2002/02/08/iframe.html

^^
0
 

Author Comment

by:tittlejoseph
ID: 6993847
No mate, this is not what i want
0
 

Accepted Solution

by:
d97mivo earned 400 total points
ID: 7250839
Do you have any solution for this problem? I found this links very usefull:

http://developer.netscape.com/viewsource/goodman_modal/goodman_modal.html

and a fix:

http://www.dannyg.com/modalIEFix.html

Hope it helps!
0
 

Author Comment

by:tittlejoseph
ID: 7251435
I think i cant get any good answer then this. Although it has very little flaws still it will work.

I've been looking for it from a long time and was astonished that microsoft never thought to implement this.

I didnt implement it but gone through code and i'm sure it will work.

Thanx buddy
tittlejoseph@yahoo.com

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
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…

809 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