Hi Scott,

It doesn't seem to work.

My submit buttons look like this:
<html:submit property="navigation" value="Previous" styleClass="button" >
              <bean:message key="button.previous"/>
</html:submit>&nbsp;&nbsp;&nbsp;

Now, if I have a link, how can I set the property navigation for it.
"  onClickSubmit()  pic.gif   "




Scott Van Wart-2 wrote:
> 
> Christopher Goldman wrote:
>> On Thu, 2006-08-17 at 14:26 -0700, mosho wrote:
>>   
>>> Hi All,
>>>
>>> I have multiple buttons on my form and I am using LookUpDistpatchAction
>>> to
>>> submit the form depending on which button is clicked.
>>>
>>> I have another requirement now, I have multiple images that are going to
>>> be
>>> links. I need to submit the form using onclick.
>>>
>>> So in my javascript, I will have to submit the form. How can I change/
>>> set
>>> the  value for my parameter?
>>>
>>> It is giving me error:
>>> Request[/selectLocation] does not contain handler parameter named
>>> navigation
>>>
>>> Thanks for your help,
>>>     
>>
>> In your onclick handler for the images, change the (presumably) hidden
>> form input field value:
>>
>>   document.forms["form-name"].elements["navigation"].value = "new-value"
>>
>> Then, submit the form.
>>
>> This is in Firefox.  Looks like it works for IE as well.
>>
>> Not really a Struts question -- just straight Javascript...
>>   
> Doesn't he need to match up the message resource values, like if he had,
> 
>   protected Map getKeyMethodMap() {
>     Map map = new TreeMap();
>     map.put( "form.create", "create" );
>     return map;
>   }
> 
> Then it would take a little trickery in the JSP to get the right values 
> in the Javascript:
> 
> <c:set var="createLabel">
>   <bean:message key="form.create" />
> </c:set>
> 
> So the web browser passes the correct value, and the lookup map will work:
> 
> function onClickCreate() {
>   document.someForm.action.value = "${createLabel}";
>   document.someForm.submit();
> }
> 
> That should do it I think...
> 
> - Scott
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Question-about-Lookup-dispatch-action-tf2124092.html#a5876941
Sent from the Struts - User forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to