Maybe i'm missing something...but..why can't you just use straight html, for example: <input type="button" value="Close" onclick = "javascript:window.close();" />

--
Regards,
Richard Stephens
Ph: 07 3136 3426
Mob: 0410 111 570
Email: [email protected]

On 06/03/2009, at 11:26 AM, Chuck Hill wrote:


On Mar 5, 2009, at 1:25 PM, David Ress wrote:

List,

I know I am missing something obvious, but lack of sleep, etc... is
keeping my neurons from firing...

I have  3 WOSubmitButton inside a WOForm, ie,

<webobject name="Form1">
<webobject name="DownloadButton"></webobject>
<webobject name="CloseButton"></webobject>
<webobject name="GraphButton"></webobject>
</webobject>

where:

Form1: WOForm {
}

DownloadButton: WOSubmitButton {
        action = downloadReport;
        value = "Download";
}

CloseButton: WOSubmitButton {
        action = savedPage;
        value = "Close";
I think you want this:
        onClick = "javascript:window.close(); return false;";

The "return false;" tells the button to not do what it normally does (submit the form).




}

GraphButton: WOSubmitButton {
        action = createGraphs;
        value = "Graph";
}

DownloadButton and GraphButton work fine, it is the darn CloseButton
which is causing me issues.

Not sure what exactly my problem is, but if I remove the action binding
from CloseButton's definition in the WOD then WOLips' component
editor complains. If I leave it in (savedPage returns the last page visited), then I receive the following error in the Eclipse console log during runtime:

<WorkerThreadX> ... Exception while sending response: java.net.SocketException: Broken pipe

That just means that the browser window has been closed and so the response can't be returned. That is more of an "info" message than an error or warning.


What I want to do is close the web page without any errors, either in WOLips
or the console log. Any thoughts? Better ways?

That should do it.  If not, use an AjaxSubmitButton.


Chuck



Oh, using Eclipse 3.3.2, WOLips 3.3.5563, Mac OS X 10.5.5, Wonder 5.4.

Thanks,
David
---
David Ress, PhD
Now with GDIT in Dayton, Ohio, but still using old email account with ISTL.

_______________________________________________
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/chill%40global-village.net

This email sent to [email protected]


--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
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/rjst01%40iinet.net.au

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]

Reply via email to