Hello;

I have a WOpopup in a worepitition, each WOPopup has a WOSubmit button (both are in a TD tag) associated with it and it's style=visibility.hidden.

The WOForm has to have multiplesubmit set to true.
The WOSubmit must have it's action set to the method you wish to call in the java file.

I created a javascript function created to find the associated WOSubmit button that is associated with the WOPopup.

          function listChanged(oElement) {
             oParent = oElement.parentNode;
             //oAlert = oParent.type + "\n";
             oChildren = oParent.childNodes;
             for (i=0;i<oChildren.length;i++) {
               if (typeof(oChildren[i].type)!='undefined') {
                if (oChildren[i].type=='submit'){
                  oChildren[i].click();
                }
                //oAlert += "\n" + oChildren[i].type + "\n";
              } else {
                //oAlert += "n,";
              }
             }
            //alert(oAlert);
          }

I set the otherTagString of the WOPopup to onchange=listChanged(this);

The javascript function finds the associated wosubmit and clicks it programatically.

Don

On May 9, 2008, at 4:17 PM, Eric E. van Leeuwen wrote:

Lachlan (et al),

Thanks for the quick response. But I must apologize for omitting the fact that I'd like to avoid using "3rd party" add-ons. Anyone else want to take a crack at it?

Eric

On May 9, 2008, at 12:18 PM, Lachlan Deck wrote:

Hi Eric,

On 10/05/2008, at 4:55 AM, Eric E.van Leeuwen wrote:

I need a way to "bridge" from javascript to my webobject's java. I have a situation where I need a WOPopupButton's onChange javascript event to call a method defined in the .java file of the WOComponent.

You'll want to take a look at the Ajax framework (and example app) in Project Wonder.
Live example: http://www.mdimension.com/cgi-bin/WebObjects/AjaxExample.woa

with regards,
--

Lachlan Deck

_______________________________________________
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/pccdonl %40mac.com

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