Re: Need help in calling a method defined in the .java file from a javascript fired from a javascript event
Re: Need help in calling a method defined in the .java file from a javascript fired from a javascript event
- Subject: Re: Need help in calling a method defined in the .java file from a javascript fired from a javascript event
- From: Chuck Hill <email@hidden>
- Date: Fri, 9 May 2008 13:49:42 -0700
That is a full page submit, not JavaScript calling a server method.
Chuck
On May 9, 2008, at 1:44 PM, Eric E. van Leeuwen wrote:
Don,
Thanks! I'm going to give this a try.
Eric
On May 9, 2008, at 1:29 PM, Don Lindsay wrote:
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@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
--
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