in reply to Perl CGI -disabled

Hi,

I couldn't find a hint on that -disabled in the perldoc of CGI concerning an input field. But anyways: When you have a chance to create your HTML tags by hand you could use the HTML attribute readonly for input fields (http://www.w3schools.com/tags/att_input_readonly.asp). When I'm not totally wrong the value of that input field should be transmitted back to the server.

Regards
McA

Replies are listed 'Best First'.
Re^2: Perl CGI -disabled
by choroba (Cardinal) on Sep 22, 2014 at 15:15 UTC
    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.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

      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.)

      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