• 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: Javascript Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Javascript Question


  • Subject: Re: Javascript Question
  • From: Travis Britt <email@hidden>
  • Date: Fri, 26 Feb 2010 17:50:42 -0500

In general you can always define an AjaxUpdateLink with an action binding and a functionName and then assign that JS function to any handler as if it where any other JS function (b/c it is) which will then fire the bound method in your app and update whatever container you need.

tb

On Feb 26, 2010, at 3:03 PM, Andrew R. Kinnie wrote:

> Greetings all,
>
> OK, I have generally been successfully able to avoid using javascript directly because of the wonders of WO and . . . um . . . Wonder.  However, now I have an issue that seems to scream out for an obvious answer.
>
> I have a WOPopUpButton for the user to select a preferred phone number among "Home," "Work" and "Mobile" which will be saved in the db as a number (1, 2 or 3).  I want to have this popup dynamically generated based on whether the appropriate phone number fields in the UI have values other than and empty string.
>
> So this all works using an AjaxObserveField surrounding the phone number fields in the UI . . . as long as the user presses enter or return when done editing the phone number field.  I would like it also to work when the user tabs out of the field to another field.
>
> I could use javascript to manage such a list directly in javascript, because I just found such a thing via google.  This has the benefit of avoiding going back to the server.  However, I DO need the selection from the popup to be sent back to the WO app when the AjaxSubmitButton's action is called.  I am quite the javascript novice (obviously).  I was trying to think of ways to use onblur or something but I can't seem to get it called by the WO app.  It occurred to me that this sort of thing seems common enough that there may be a best practice for doing this sort of thing, and possibly a fabulous Wonder mechanism I haven't seen.
>
> Any suggestions?  Best practices?
>
> Andrew
>
> WO 5.4.3, Wonder 10685
> Eclipse/Wolips 3.5
>
> _______________________________________________
> 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: Javascript Question
      • From: "Andrew R. Kinnie" <email@hidden>
References: 
 >Javascript Question (From: "Andrew R. Kinnie" <email@hidden>)

  • Prev by Date: Re: Installing WO on Centos 5.4
  • Next by Date: Re: Javascript Question
  • Previous by thread: Javascript Question
  • Next by thread: Re: Javascript Question
  • Index(es):
    • Date
    • Thread