On Dec 6, 2007, at 4:31 PM, Robert Walker wrote:
function doFormSubmit(theForm) {
theForm.target = "NewWindow";
newWindow =
window.open("","NewWindow","width=650,height=600,resizable=yes");
newWindow.focus();
return true;
}
Also be aware that popup blockers will block window.open(...) in the
JavaScript.
Only the really angst filled ones that block ALL popups regardless of
their origin. And if that's the case then nothing he does is going to
work. However, most good popup blockers will recognize that this is
the direct result of a user action (submitting a form) and allow the
popup.
On Dec 6, 2007, at 12:38 PM, Galen Rhodes wrote:
On Dec 6, 2007, at 1:40 AM, Kevin Windham wrote:
I want to load the results of a form into a new window and then
redirect the original form page to a different location. I can do
this with a regular link using the technique described here <http://en.wikibooks.org/wiki/Programming:WebObjects/Web_Applications/Development/Examples/Open_Link_in_New_Window
>, but I haven't figured out how to do it with a form result.
Essentially what you're going to do is trap the "onSubmit" message
of the form or the "onClick" message of one of the buttons. Then
what you have to do is open a blank window and then make sure the
target for the form is the same as the new window. You can do this
last part in one of two ways: 1) set the target in the form tag or
2) (if you only want it to happen under certain conditions) set the
target in the javascript just before you open the window. Here's a
brief example:
The HTML:
<webobject name="TheForm">...</webobject>
The WOD:
TheForm : WOForm { action = myAction; onsubmit = "return
doFormSubmit(this)"; }
The Javascript:
function doFormSubmit(theForm) {
theForm.target = "NewWindow";
newWindow =
window.open("","NewWindow","width=650,height=600,resizable=yes");
newWindow.focus();
return true;
}
Anyone got any ideas how to do this?
Thanks,
Kevin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/grhodes%40thissmallworld.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/robert.walker%40bennettig.com
This email sent to [EMAIL PROTECTED]
--
Robert Walker
[EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/grhodes%40thissmallworld.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]