RE: Using Javascript submit(), how can I tell what did the submit in an action?

2002-11-15 Thread Jörgen Lundberg
Hmm, something happened to my attachment...
I'll just post the code here then

 / Jörgen

 for emailclients that read html
->8->8---



function whichDropDown(dropDown) {
   alert("changed: " + dropDown);
   document.thaForm.changedDropDown.value = dropdDown;
   //submit();   
}







One
Two



Three
Four






->8->8---


-Original Message-
From: Jörgen Lundberg [mailto:jorgen.lundberg@;home.se] 
Sent: den 15 november 2002 14:45
To: [EMAIL PROTECTED]
Subject: RE: Using Javascript submit(), how can I tell what did the
submit in an action?


You can make the onChange call a JS-function.

Maybe this is what David suggested in 3) below...
Anyway, attached is an example.

 / Jörgen


-Original Message-
From: Karr, David [mailto:david.karr@;attws.com] 
Sent: den 14 november 2002 17:30
To: Struts Users Mailing List
Subject: RE: Using Javascript submit(), how can I tell what did the
submit in an action?


I see several strategies for this:

1. Design your page and your Action so you don't need to know.  Your
request parameters will indicate the current settings.  This will allow
your page to work even if javascript is disabled (an unfortunate
consideration).

2. Put each drop down into its own form.

3. Make the onchange handler also use dhtml to set the value of a hidden
field.

> -Original Message-
> From: Ryan Cornia [mailto:RCORNIA@;utah.gov]
> Sent: Thursday, November 14, 2002 8:25 AM
> To: w
> Subject: Using Javascript submit(), how can I tell what did the submit

> in an action?
> 
> 
> I have a form with multiple drop downs that do a Javascript submit() 
> when they are changed. (This is so that they can change other drop
> downs.) The problem is that once I get into the action, how can I tell

> which drop down's "onchange" event caused the submit? I can't find any

> request parameters that are set.
> 
> Any ideas?
> 
> Thanks,
> Ryan



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




RE: Using Javascript submit(), how can I tell what did the submit in an action?

2002-11-15 Thread Jörgen Lundberg
You can make the onChange call a JS-function.

Maybe this is what David suggested in 3) below...
Anyway, attached is an example.

 / Jörgen


-Original Message-
From: Karr, David [mailto:david.karr@;attws.com] 
Sent: den 14 november 2002 17:30
To: Struts Users Mailing List
Subject: RE: Using Javascript submit(), how can I tell what did the
submit in an action?


I see several strategies for this:

1. Design your page and your Action so you don't need to know.  Your
request parameters will indicate the current settings.  This will allow
your page to work even if javascript is disabled (an unfortunate
consideration).

2. Put each drop down into its own form.

3. Make the onchange handler also use dhtml to set the value of a hidden
field.

> -Original Message-
> From: Ryan Cornia [mailto:RCORNIA@;utah.gov]
> Sent: Thursday, November 14, 2002 8:25 AM
> To: w
> Subject: Using Javascript submit(), how can I tell what did the submit
> in an action?
> 
> 
> I have a form with multiple drop downs that do a Javascript submit()
> when they are changed. (This is so that they can change other drop
> downs.) The problem is that once I get into the action, how can I tell
> which drop down's "onchange" event caused the submit? I can't find any
> request parameters that are set.
> 
> Any ideas?
> 
> Thanks,
> Ryan


--
To unsubscribe, e-mail:   
For additional commands, e-mail: