« Return to Thread: struts 1.2: calling an action by javascript

Re: struts 1.2: calling an action by javascript

by Ingo Villnow :: Rate this Message:

Reply to Author | View in Thread

GREAT Thank you very much!!

Frank W. Zammetti schrieb:

> I should also point out the presentation Ted Husted did at The Ajax
> Experience last week which dealt largely with APT.  The slides for that
> presentation are here:
>
> http://ajaxexperience.techtarget.com/images/Presentations/Husted_Ted_RetrofittingStruts.pdf
>
> I'm not quite sure how long they will stay posted there though, so get it
> while it's hot :)
>
> Frank
>
> On Wed, October 31, 2007 10:48 am, Frank W. Zammetti wrote:
>  
>> On Wed, October 31, 2007 10:19 am, Ingo Villnow wrote:
>>    
>>> i want to call an action by javascript, when a value in a <html:select>
>>> field changes. I want to fill my <html:form> with the data provided by
>>> the action. Any ideas? I don't know a lot of javascript :-(
>>>      
>> There's a couple if ways you could do that... one would be to call the
>> submit() method of the form object, which every form in HTML has, then
>> re-render the page with the updated data in the form.  That's of course
>> going to refresh the entire page, which I suspect isn't what you want.
>>
>> So, AJAX is probably what you want.  Now, how you go about doing that,
>> well, there's a few hundred options :)  Because you don't know a lot of
>> Javascript, you might want to consider the AjaxParts Taglib (APT) from
>> Java Web Parts (JWP):
>>
>> http://javawebparts.sourceforge.net
>>
>> Direct to APT:
>>
>> http://javawebparts.sourceforge.net/javadocs/javawebparts/ajaxparts/taglib/package-summary.html
>>
>> If you go to the download page, the cookbook has some examples that are
>> very much along the lines of what you're asking for.  If you go that
>> route, we'll be more than happy on the JWP mailing list, or forums.
>>
>> Otherwise, prototype (http://www.prototypejs.org) is a good, simple
>> option, but you will be writing some Javascript.
>>
>>    
>>> thanks & greetings from Berlin
>>>      
>> hth,
>> Frank
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@...
>> For additional commands, e-mail: user-help@...
>>
>>
>>    
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@...
> For additional commands, e-mail: user-help@...
>
>
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...

 « Return to Thread: struts 1.2: calling an action by javascript