• 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: JSModalWindow Close and Refresh Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JSModalWindow Close and Refresh Question


  • Subject: Re: JSModalWindow Close and Refresh Question
  • From: Jonathan Rochkind <email@hidden>
  • Date: Wed, 31 Mar 2004 11:02:41 -0600

I think "window.close();" is what you want, not "self.close();" although I'm no javascript expert (I know just enough to get by, and research how to do things as they come up. The Javascript FAQ at www.irt.org is very valueable for 'recipes' of how to do certain things in javascript, from simple to complex).

I don't see any reason why the onclick shouldn't work, but when I want a hyperlink that _only_ executes javascript, and does not actually load a URL, I personally use a different idiom:
href="javascript: someJavascirpt(); return void 0;"


That has always worked better for me than messing with onclick---I use onclick only if I want some javascript to happen upon click, but ALSO want a URL loaded.

As far as your other question: I can't see any reason why JSModalWindow shouldn't be in a WORepetition. On my machine (which is WO 5.2.1, though), I don't get a WOBuilder validation error from doing this. What is the specific text of the validation error WO gives you? Regardless, it is sometimes okay to just ignore WOBuilder validation errors, when it gets things wrong, and see if it works at runtime anyhow.

At 9:19 AM -0600 3/31/04, James Cicenia wrote:
Hello -

I am a bit confused on bit of JSModalWindow...

On the calling page I have an action that does the usual
nextPage assignment with some initializations and my
window pops up perfectly. Upon cancel I do a
onClick binding with "self.close();";

However I can't seem to figure out how to close the window
on my submit button. It does perform my submits action method,
i.e., it update the database, but it doesn't close the window!?

I have tried binding onClick = "opener.refresh();self.close();";
and
onClick = "self.close();opener.refresh();";


but it neither closes the window or refreshes the window. Any thoughts here ?

Thanks

-James Cicenia
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: JSModalWindow Close and Refresh Question
      • From: James Cicenia <email@hidden>
References: 
 >JSModalWindow Close and Refresh Question (From: James Cicenia <email@hidden>)

  • Prev by Date: Re: Version Control System
  • Next by Date: Re: JSModalWindow Close and Refresh Question
  • Previous by thread: JSModalWindow Close and Refresh Question
  • Next by thread: Re: JSModalWindow Close and Refresh Question
  • Index(es):
    • Date
    • Thread