Re: newbie question - setting form parameter in Javascript

2003-07-12 Thread Firat TIRYAKI
PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 11, 2003 9:15 PM Subject: newbie question - setting form parameter in Javascript Hi, I have an HTML form with Submit and Cancel buttons, and a drop down list, which when clicked submits the form. I use Javascript to submit the form when

Re: newbie question - setting form parameter in Javascript

2003-07-12 Thread Rick Reumann
My Javascript function is given below: SCRIPT language=JavaScript function submitForm(form) { form.action.value=Lookup; form.submit(); return true; } # and I invoke this function in my HTML form as shown below:

Re: newbie question - setting form parameter in Javascript

2003-07-12 Thread Shyam A
Mark, Thanks a lot for your mails. I have used action as a form bean property and not as a parameter in struts-config. Unfortunately, the Javascript function doesn't seem to work...it does not set the value of the ActionForm property, action. When I tried to print out the value of the action

newbie question - setting form parameter in Javascript

2003-07-11 Thread Shyam A
Hi, I have an HTML form with Submit and Cancel buttons, and a drop down list, which when clicked submits the form. I use Javascript to submit the form when the dropdown list is clicked. I have a property called action defined in my ActionForm class that identifies the Submit and Cancel

Re: newbie question - setting form parameter in Javascript

2003-07-11 Thread James Mitchell
You will need to create a hidden field named action, with a value of Lookup: html:hidden property=action value=Lookup/ My question to you iswhy Lookup? What does that have to do with your form? Here's a sample: SCRIPT language=JavaScript function submitForm(form) {

Re: newbie question - setting form parameter in Javascript

2003-07-11 Thread Shyam A
James, Thanks for your mail. I guess I need to elaborate a little bit. My HTML form can be submitted in 2ways. 1. Clicking the Submit button. 2. Clicking the drop-down Clicking the drop-down triggers a different action than clicking the Submit button. Selecting a value in the drop-down would

Re: newbie question - setting form parameter in Javascript

2003-07-11 Thread Mark Lowe
check out dispatch actions.. you can have multiple execute methods with dispatch action ... Your Action class extends DispatchAction instead of action (check the docs) public final ActionForward submit( ActionMapping mapping,

Re: newbie question - setting form parameter in Javascript

2003-07-11 Thread James Mitchell
I think I see where you are goingtry setting the form action instead: SCRIPT language=JavaScript function submitForm(form) { document.frm.action=lookup.do; // --Change this to not be hard-coded form.submit(); return true; } /SCRIPT form name=frm action=? method=GET input type=hidden

Re: newbie question - setting form parameter in Javascript

2003-07-11 Thread Mark Lowe
Its better that this is posted to the list as well, after all its a good question and hopefully an adequate answer. script language=javascript type=text/javascript !-- function lookup(form) { form.elements['action'].value = lookup; form.submit(); } //-- /script html:form

Re: newbie question - setting form parameter in Javascript

2003-07-11 Thread Mark Lowe
opps my action in struts config is wrong... But you should still have the right idea.. On Saturday, July 12, 2003, at 12:45 AM, Mark Lowe wrote: Its better that this is posted to the list as well, after all its a good question and hopefully an adequate answer. script language=javascript