Re: how can I return form results in a new window?
Re: how can I return form results in a new window?
- Subject: Re: how can I return form results in a new window?
- From: Kevin Windham <email@hidden>
- Date: Thu, 6 Dec 2007 13:45:10 -0600
On Dec 6, 2007, at 11:38 AM, Galen Rhodes wrote:
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 = "" ; }
The _javascript_:
function doFormSubmit(theForm) { theForm.target = "NewWindow";
newWindow = window.open("","NewWindow","width=650,height=600,resizable=yes");
newWindow.focus();
return true; }
I think this is going to work. What I was missing was targeting the new window by name and using the onSubmit of the form to set things up before the form actually submits.
Thanks, Kevin |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden