On 12/20/06, Les Mizzell <[EMAIL PROTECTED]> wrote:
> I'm using the <button> tag to submit a form as I have text formatting
> using CS that needs to be done inside the button:
>
> <button name="submit1"
>          type="submit"
>          id="submit1"
>          value="action1">
> Button text<br>like this
> </button>
>
>
> Here's the problem - IE and Firefox see DIFFERENT values passed when the
> button is clicked!
>
> When the form is submitted using the button above
> "action1" is passed along in Firefox
> "Button text<br>like this" is passed in IE
>
> How do I get the button (actually, 7 of them calling different actions)
> to submit the form and pass the same value in all browsers?
>
> In fact - it looks like the values for all 6 buttons are passed in IE,
> not just the single button clicked.
>
>
>
> I can't use a regular <input type="submit"> because of the needed text
> formatting.
>
> Ideas?
> ______________________________________________________________________
> css-discuss [EMAIL PROTECTED]
> http://www.css-discuss.org/mailman/listinfo/css-d
> IE7 information -- http://css-discuss.incutio.com/?page=IE7
> List wiki/FAQ -- http://css-discuss.incutio.com/
> Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
>

A way out of your dilemma may be to add a hidden textfield

<input type='hidden' name='whichbutton'>

<button name="submit1"
        type="submit"
        id="submit1"
         onClick="this.form.whichbutton.value = 'a_value_as_you_like';
return true;"
        value="action1">button title</button>

Then you can pick up which button was clicked on the server side by
looking at the
hiddenbutton parameter, replace 'a_value_as_you_like' with something
more meaningful.

Maybe you can't depend on javascript though.

Stephan
-- 
Stephan Wehner
> http://stephan.sugarmotor.org
> http://stephansmap.org
> http://www.trafficlife.com
> http://www.buckmaster.ca
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to