in reply to Re: Perl CGI -disabled
in thread Perl CGI -disabled

The quality of W3Schools you linked to has been disputed, but they explain -disabled together with its behaviour when submitted: http://www.w3schools.com/tags/att_input_disabled.asp
Tip: Disabled <input> elements in a form will not be submitted.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^3: Perl CGI -disabled
by Your Mother (Archbishop) on Sep 22, 2014 at 15:36 UTC

    OT: I think W3Schools gets an unfair shake. As you note, they had the right answer in this case. I reported a documentation/interpretation bug to the webmaster back in 2002 or something and got an immediate response and fix.

    (update, s/a/an/; DERP.)

Re^3: Perl CGI -disabled
by McA (Priest) on Sep 22, 2014 at 15:39 UTC

    Thanks for the valueable annotation. I haven't found that. By the way: I never ever used CGI.pm to produce HTML. It felt always clumsy to me.

    I have to admit: W3Schools was the first result at Google. :-)

    McA

      Thanks all your replies were very helpful; its a subtle effect of -disabled . Still seems undesirable to leave this out of the post, since if I only wanted to display the value, I would have just printed it, and not had it in an input text box with a name and value.

      I am familiar with *readonly*, and in fact it's what I ended up using. It still allows users to CLICK in the box however, which yields email to me like "hey I can't CHANGE this value- why??". When they cant click in the box it behaves like any other static page text, and I don't get those questions.. My javascript guy is seeing if he can get me some .css type that prevents clicking in the box.

      Wow like 4 great replies, with no haters, flames, or abuse. Things are looking up here! Kudos guys :)

      THanks again,
      MP

        As an aside, I have to ask do you really need to use CGI, and if so is there a reason you're not using some templating mechanism (e.g. HTML::Template/Template)? The reason I ask is that it's no secret that the module itself is quite dated, and can make life really quite difficult for you. The documentation states:

        CGI.pm HAS BEEN REMOVED FROM THE PERL CORE

        "The rational for this decision is that CGI.pm is no longer considered good practice for developing web applications, including quick prototyping and small web scripts. There are far better, cleaner, quicker, easier, safer, more scalable, more extensible, more modern alternatives available at this point in time. These will be documented with CGI::Alternatives."