• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WOSubmitButton closing the browser window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WOSubmitButton closing the browser window


  • Subject: Re: WOSubmitButton closing the browser window
  • From: Richard Stephens <email@hidden>
  • Date: Fri, 6 Mar 2009 15:17:22 +1000

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@hidden

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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


-- 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@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden

_______________________________________________ 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
  • Follow-Ups:
    • Re: WOSubmitButton closing the browser window
      • From: Mark Morris <email@hidden>
References: 
 >WOSubmitButton closing the browser window (From: David Ress <email@hidden>)
 >Re: WOSubmitButton closing the browser window (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: WOLips - Entity Modeler - reverse engineer from multiple scheme/user?
  • Next by Date: LDAP and EOF
  • Previous by thread: Re: WOSubmitButton closing the browser window
  • Next by thread: Re: WOSubmitButton closing the browser window
  • Index(es):
    • Date
    • Thread