http://www.perlmonks.org?node_id=411941


in reply to Re^4: Review: CGI::Prototype
in thread Review: CGI::Prototype

You get into namespace issues. It's easy to give two submit buttons the same value in your application that are supposed to go to different runmodes. In a large application, you'll probably run out of good names eventually.

I always felt that HTML using the "value" param on submit buttons was a bad design choice, and I think this illustrates that problem well. This, of course, is HTML's problem, not C::A's.

"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Replies are listed 'Best First'.
Re^6: Review: CGI::Prototype
by stu42j (Sexton) on Jan 18, 2005 at 18:46 UTC
    I always felt that HTML using the "value" param on submit buttons was a bad design choice, and I think this illustrates that problem well. This, of course, is HTML's problem, not C::A's.

    Actually, it is Microsoft's problem. HTML has the buttom element which allows you to seperate the form value from the buttom display. IE6 messes it up, though. Otherwise, you could do something like:

    <button type="submit" name="runmode" value="doform1">Send Form</button>

      Wow, never even knew that worked.

      For those tuning in at home, I did some testing. I implemented a basic form with this:

      <button type="submit" name="runmode" value="1">Send</button>

      Firefox correctly sends this as "runmode=1", while IE sends "runmode=Send". Thanks to MS for ruining a fix to one of HTML's design flaws!

      "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.