anatolii

Hi,
This issue has been mentioned on this forum but never explained and no workaround provided. Basically, I have model window, open smth. like this:

<a href=" void(0);"" onClick=""var result=showModalDialog('Lookup.aspx ..<some param>....', 'Lookup', 'dialogHeight: 540px; dialogWidth: 580px; center: yes; edge: sunken; help: no; scroll: yes; status: yes; ' );

Inside that dialog there is a regular HTML form:
<form id="ReportForm" method="post" runat="server">

Now, if I submit this form IE opens new window instead of refreshing the dialog window. IE6 had same behaviour but we found workaround by putting <base> tag inside <HEAD> with target set to "_self".
<HEAD> ... <base target="_self"/> </HEAD>

In IE 7 this workaround stopped working and we can not find another one.
Last thing, don't mention target on the form itself. It never worked in neigher IE 6 or IE 7.

We welcome any suggestions/comments. Thanks.



Re: Internet Explorer Web Development in IE 7 target is ignored in the form on the modal window

Lance Leonard

Hi Anatolii,

Is your document in strict mode If so, that's why. The strict DTD's for HTML 4 don't support the target attribute.

I haven't tried to implement a system like the one you describe, but the recommendations for similar scenarios that I've seen include:

  • Using quirks mode instead of strict mode for the document.
  • Using a transitional or fraeset DTD
  • Using script to set the target properties (remember to do so after the document loads).

Again, I haven't tried your specific scenario, but I hope one of these ideas might help.

As far as why it stopped working in IE7, remember that a lot of effort went into improving standards compliance. I'm not sure if there was a specific blog entry that discussed this particular change, but there were several that talked about improved standards compliance.

Hope this helps...

-- Lance






Re: Internet Explorer Web Development in IE 7 target is ignored in the form on the modal window

Slashdrew

Have you discovered a way to make this work None of the three options seemed to make a difference for me.






Re: Internet Explorer Web Development in IE 7 target is ignored in the form on the modal window

fedecheller

I found how to permit the postbak in the modal dialog page on IE7:
in the head you have to insert the script:
window.name="mypage";

and in the form tag add the attribute target="mypage"

and it work fine!!!!!