Reply to Re: Error trapping in Perl-generated page

Your name:

Reply:


Posted by Ed Jay on 12/17/55 11:31

mbstevens <NOXwebmasterx@xmbstevensx.com> wrote:

>Ed Jay wrote:
>
>>>Hmm. So, when people who hate javascript visit, they have to re-set
>>>their browser, and then re-re-set it on leaving. Are you sure that you
>>>really _need_ to require your visitors to use javascript? I once did
>>>banking at a place that required that, and it irritated the hell out of me.
>>
>>
>> lol. My subscribers are medical doctors and the computer they'll (actually
>> their techs) will be using are probably already enabled for js.
>
>I wasn't talking about 'enabled', I was talking about visitors that just
>don't like to use it. This could be for security reasons, or just
>because they don't like it.

Understood
>
>>>As long as you can already program some in Perl, just do it right and
>>>generate a page with a script to get the information needed. All this
>>>jumping around in javascript sounds a bit kludgy for my taste, but it's
>>>your page.
>>>
>>
>> I'm trying to be as non-kludgy as possible, but without having to resort
>> to lengthy scripts.
>>
>I don't think it would have to become lengthy. You would just need to
>use conditionals to determine which parts of the page to re-generate
>given the answers received. One easy way would be to use templates:
>http://www.mbstevens.com/cgi/mkatt.pl?name=cgi_perl/html_through_cgi
>may help.
>Or, you could just keep markup snippets in variables.
>
>A certain level of complexity is going to be needed to do what you want.
> Doing things in JavaScript won't alleviate that -- it will only
>spread the burden to a second programming language, making the site just
>that much harder to keep up.
>
Agreed.

I almost feel stupid. I solved my problem in the most elementary
manner...without js or any error checking.

There are three questions. The first asks if either $A or $B should be
set. The second asks if $A should be set, and the third asks if $B should
be set. Subsequent processing queried the values for $A and $B. This is
why $A and $B could concurrently be set.

I renamed all variables to $C, but give different values, e.g., if nether
$A or $B are set then $C == 0. If $A is set then $C == 1. If $B is set $C
== 2. Using radio buttons all named $C, it's not possible to concurrently
set $A and $B.

During data processing, I simply test the value of $C.

I wonder how I'll waste tomorrow. :-(

--
Ed Jay (remove M to respond by email)

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация