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
Solved

[javascript]showModalDialog in IE7 problem

Posted on 2012-03-28
8
473 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
ID: 37775559
0
 

Author Comment

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

Expert Comment

by:gman84
ID: 37775609
What is the javascript error that is thrown?
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 20

Expert Comment

by:BuggyCoder
ID: 37775618
kindly use this to debug your Js and see the error:-
http://getfirebug.com/firebuglite
0
 

Author Comment

by:whbcn
ID: 37775978
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
ID: 37776011
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
ID: 37780796
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
ID: 37780996
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Suggested Solutions

Title # Comments Views Activity
Html fieldset fix its height and width 4 32
Binding a Grid in Javascript 5 43
asp.net open new page without popup blocker 8 19
2 separate CSS animations 2 17
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…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

837 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