• 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: Openning an extra window on button click
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Openning an extra window on button click


  • Subject: Re: Openning an extra window on button click
  • From: Serge Cohen <email@hidden>
  • Date: Sun, 4 May 2008 23:17:37 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Alexander;

Indeed I can not use the target attribute of the WOForm as indeed this form is a multi-submit form (an dmost possible action have to return within the same window).

Still I guess the proposal to just include a javascript on the page at whatever location would work. I'll try that and will comment when I have done it.

If I understand what you're proposing properly, I just have to include in the html of the component a Javascript which can contain some code using a WOACtionURL to open the window ... Something like :

<wo:if condition="$DetailPanelShouldDispaly">
< script type="text/javascript">
window.open("<webobject name="MyActionURL" />", "_blank", menubar = no ,toolbar =no,status=no,scrollbars=yes,resizable=yes,height=300,width=300);
</script>
</wo:if>


This would be executed as soon as the browser reads it ?

Thanks for the tip;

Serge.


Le 4 mai 08 à 18:08, Alexander Spohr a écrit :


Am 04.05.2008 um 02:30 schrieb Serge Cohen:

Now, I'd like to have a button in the form, which when clicked would create an extra window with a detailed list of the SELECTED object of class A.

form: WOForm { action = yourAction; target = "newNiceLittleWindow"; }


To me this should be a button ("detail of selected"), so that I have a chance to get the current state of the selection. Furthermore the corresponding method should return "null" (so that the content of the window does not change).

No, do not return null but the content of the new detail-page. This will just be displayed in your newNiceLittleWindow;



Now I also want another (new) window to open up; to achieve that my idea was to add to the BODY onload action a small call to "window.open(someURL, "_blank", "...")" calling a method that would return the detail of the selected object. I guess I have to use WOActionURL to generate the URL used by window.open ... ?

Don’t do that. That would always be called. Then you’d have to add a WOConditional for the body-tag and the horror begins :)


A last question, which indeed is more HTML related : Indeed I'm using a wrapper component for having a consistent layout over all the pages of the application. This makes it complicated for me to add on demand a "onload" javascript to the BODY element... Is there a more convenient place I can place that one ?

Dont use onLoad. Just put the JavaScipt where (your enclosed WOComponent-page) it is needed, and it will run when the Browser parses it.


	atze



-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkgeJ/EACgkQlz6UVQtc2uwn5QCgp3AuFwTyIOxxU7kZSpcKKcNU
qCsAoOf8RM6nM0VVHVXbXuXDq+JNGjbm
=zHXY
-----END PGP SIGNATURE-----
_______________________________________________
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


References: 
 >Openning an extra window on button click (From: Serge Cohen <email@hidden>)
 >Re: Openning an extra window on button click (From: Alexander Spohr <email@hidden>)

  • Prev by Date: Re: How to get rid of ?wosid=
  • Next by Date: EOGeneration
  • Previous by thread: Re: Openning an extra window on button click
  • Next by thread: Sorting to many relationship
  • Index(es):
    • Date
    • Thread