[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 495
  • Last Modified:

[javascript]showModalDialog in IE7 problem

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
whbcn
Asked:
whbcn
  • 3
  • 3
  • 2
1 Solution
 
whbcnAuthor Commented:
BTW, rebuild the function is not my option!
0
 
gman84Commented:
What is the javascript error that is thrown?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
BuggyCoderCommented:
kindly use this to debug your Js and see the error:-
http://getfirebug.com/firebuglite
0
 
whbcnAuthor Commented:
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
 
gman84Commented:
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
 
whbcnAuthor Commented:
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
 
gman84Commented:
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now