Advertisement

10.18.2005 at 02:48PM PDT, ID: 21599546
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.6

IE not passing value of <button> tag properly? (pointer)

Asked by malklavious in Web Browsers

Tags: , , , ,

I'm converting some forms on my site to use the <button> tags instead of <input type="submit"> fields (for skin based CSS styling).  In Firefox and Opera they work just fine, but I found an annoying bug in IE and was wondering if anyone has found a way to get the to work properly.

I make a button tag like:
<button type="submit" name="theButton" value="buttonValue">Button Text</button>

When I click that button and the form submits, the browser is supposed to pass in a parameter named "theButton" with a value of "buttonValue".  With this logic, I can put two different buttons in the same form and let my JSP do different actions based on which button was pressed.  Opera and Firefox do this just fine.  

The problem comes in with Internet Explorer.  Instead of passing in the name/value pair of the button that was pressed, it passes in the "content" of the button tag for each button in the form, regardless of which one was pressed.  In my example above, the parameter named "theButton" would have a value of "Button Text".  If I had a second button called "theOtherButton", it's name/content pair would also be passed in, even if it was not pressed.  This bug makes it so my JSP code can't just check for which button was pressed since all the buttons are being passed in.

There are a couple work arounds that I have thought of:
JavaScript function to set the value of a hidden parameter before submitting the form.
Seperate the forms for each button (real ugly on certain forms, not possible on others).

Any others or perhaps a fix?Start Free Trial
[+][-]10.19.2005 at 01:40AM PDT, ID: 15114151

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.19.2005 at 01:51PM PDT, ID: 15119731

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.21.2005 at 05:21AM PDT, ID: 15131573

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.11.2005 at 03:13PM PST, ID: 15277588

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Web Browsers
Tags: button, passing, tag, ie, value
Sign Up Now!
Solution Provided By: malklavious
Participating Experts: 2
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32