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
| [reply] |
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."
| [reply] |
I understand and I support the removal as a sane way to get Perl out of defaulting to the 90s but it’s not quite fair to say that there are easier alternatives for everything. Yes extensible, scalable, modern, forward-thinking, editable, etc but CGI.pm’s HTML generation and parameter handling is faster and eaiser than templates and I’ll continue to use it in one-offs, helpers, starting or piecing together templates, etc. Knocking this out with a template or a hand rolled .psgi or even mojolicious is more effort. The effort of course may be justified but sometimes it’s all one wants or needs–
perl -MCGI=:all -E 'say header(), start_html(), h1("OHAI"), start_form(), p(textfield("search")), submit("Go"), end_form(), end_html()'
Years of really excellent work went into the kit as messy as is it and it can still be a nice tool when not used for things other than the backbone for a “real” application.
| [reply] [d/l] |