--Boundary-00=_EnL4+5YHHIy6+er Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline > Thanks, applied. > However, 2 seconds after applying I had a thought: doesn't this patch > mean that people who use the "smart" policy will simply see their form NOT > submitted, with no explanation why, if it would pop up another window? I > wonder if this is the best choice - I mean, although I don't like popups, if > I have to send some information, I have to do it, even if it will pop up a > window.... Maybe we could post the form to the current window (clearing > "target"), but this hack might break some sites of course.... You're right, "smart" might break some sites this way. Actually, isWindowOpenAllowed() which is used for the window.open() checks works great for form submits as well. I added a call to it, if the policy is "smart". I tried this on a testcase and it seems to work nicely. Some kind of feedback that a window has been blocked, like the status bar icon in Mozilla Firebird, might be a nice feature. The new patch is attached. regards, Ralf --Boundary-00=_EnL4+5YHHIy6+er Content-Type: text/x-diff; charset="us-ascii"; name="form3.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="form3.patch" --- /home/ralf/kjs_html.cpp 2003-06-06 17:35:12.000000000 +0200 +++ ecma/kjs_html.cpp 2003-06-06 14:10:21.000000000 +0200 @@ -2147,11 +2147,16 @@ Value KJS::HTMLElementFunction::tryCall( i18n( "Confirmation: JavaScript Popup" ) ) == KMessageBox::Yes ) block = false; + } else if ( block && policy == KHTMLSettings::KJSWindowOpenSmart ) { + if( static_cast(exec->interpreter())->isWindowOpenAllowed() ) { + // This submission has been triggered by the user + block = false; + } } } if( !block ) - form.submit(); + form.submit(); return Undefined(); } --Boundary-00=_EnL4+5YHHIy6+er--