Solved

[javascript]showModalDialog in IE7 problem

Posted on 2012-03-28
8
466 Views
Last Modified: 2012-04-15
Hi all,

I am maintaining  a web application.There is a function:
 User click the button,then pop up a modal dialog using javascript "showModalDialog" with a html page.The user will input something, then as the parameters of a function in the parent page. The function will generate a hidden form in the parent page, then submit finally!
Following is my problem:
When using the IE6 or IE8, the submit actually happen inside the modal dialog, so there is no problem(close the dialog, then return the result to the parent page).But using the IE7, the submit is look like blocked except the dialog closed, then there is a javascript error in status bar.

The implement of the function is not so good, but it works on IE6 and IE8.
Do anybody give me some suggestion about the problem?

Thanks in advance!
0
Comment
Question by:whbcn
  • 3
  • 3
  • 2
8 Comments
 
LVL 20

Expert Comment

by:BuggyCoder
Comment Utility
0
 

Author Comment

by:whbcn
Comment Utility
BTW, rebuild the function is not my option!
0
 
LVL 5

Expert Comment

by:gman84
Comment Utility
What is the javascript error that is thrown?
0
 
LVL 20

Expert Comment

by:BuggyCoder
Comment Utility
kindly use this to debug your Js and see the error:-
http://getfirebug.com/firebuglite
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:whbcn
Comment Utility
More Info:

After submit, the status bar of the parent page is displaying "waiting..." always except dialog closed.Then displays the javascript error,the meaning is "can not execute the script code that has released"
0
 
LVL 5

Expert Comment

by:gman84
Comment Utility
I've not use the "showModalDialog" functionality but putting together what I know about it and your error, I suspect that you are trying to make use of a function that exists in the modal dialog window after you have closed it. This isn't possible as all information on the dialog is lost after it has been closed.
0
 

Author Comment

by:whbcn
Comment Utility
I think the problem is why the submit can not happen inside the modal dialog when using IE7.It is the different between IE6(IE8) and IE7.
0
 
LVL 5

Accepted Solution

by:
gman84 earned 500 total points
Comment Utility
You should be able to commit the parent form by making use of the "parent" object.
parent.submit();

Open in new window

0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
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…

762 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

6 Experts available now in Live!

Get 1:1 Help Now