Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #39365

Re: Form processing issue

Path csiph.com!weretis.net!feeder8.news.weretis.net!news.mb-net.net!open-news-network.org!.POSTED.50.226.197.178.dynamic.wless.zhbmb00p-cgnat.res.cust.swisscom.ch!not-for-mail
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: Form processing issue
Date Sat, 16 Jan 2021 00:44:16 +0100
Organization PointedEars Software (PES)
Lines 50
Message-ID <12686446.uLZWGnKmhe@PointedEars.de> (permalink)
References <rtsl27$2u66$1@gallifrey.nk.ca> <c482e5e4-1e58-4f1b-a9d5-78e347353b82n@googlegroups.com>
Reply-To Thomas 'PointedEars' Lahn <cljs@PointedEars.de>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8Bit
Injection-Info gwaiyur.mb-net.net; posting-host="50.226.197.178.dynamic.wless.zhbmb00p-cgnat.res.cust.swisscom.ch:178.197.226.50"; logging-data="20161"; mail-complaints-to="abuse@open-news-network.org"
User-Agent KNode/4.14.10
Cancel-Lock sha1:5sejbhVp67BStrOSgA5Mc2L6GYw=
Face iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3HdmdAWrIJRHe7GM/TmpY5VFefuVcAkkPbLIaN8rmPmjloyZxgyR3GuJ4K0AGtJ2htz8o7yqikm759fldQXaMpbDzjKAG+8v+AugVTOPO5DOjLvGtUYQwh0CPjnVMyGd+8/GfUB5nLKJDD2aLDh5HYyMDJGDwQIo2ZmZcKbowNmAdB/AzyFhrmF2MHRb0QJJfaAnwGB6orZhoykLzJtGwF/xpYxI1dswomiUj3gTuAIqCn/4C7cULwGNBtwMTk3Y4LfKB5YUaOKBKYtpplm7u0vip8tU1NWWyI/7XdcSuIDoMt6rVHMWT0DbjHPGqDqZVSa6zleLcUTcIKLoMv3ueJluALtAo9B302zPPlrtiVScRdCjXvVh3e3JpYa/jjkuC9N+LrBMlz/eAN4eQijX2EdLo6c5tGGHwLyHFtXk89dDGHwCVhG9T0S/j55AhRZgkMCmUQXJ49TnS1wnQDvw0eAh9ICeMmEFbCnPMFzjAvsWoEWEFdYEx+S0MoUZ1gT1wId8+AF3Bl2OoEu906AUHx5VLw/gXYg/x84loOah/2UYNrgiwSwGO7RfUzVBbx/kgpckumGOi6QirtD6gkLTitbnxNol47S2jVc2vsN5kPqaAHT8uUdAJM4v/DanjYOwmUjWznGfwB7sGtAtor5BgofDuzaRj4kSQAqDakTsKORa3Q3xKi3gE1fhl71KRMqrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg==
X-Face %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&.<b';Md8`dH6iqhT)6C^.Px|[=M@7=Ik[_w<%n1Up"LPQNu2m8|L!/3iby{-]A+#YE}Kl{Cw$\U!kD%K}\2jz"QQP6Uqr],./"?;=4v
X-User-ID U2FsdGVkX19ivKWASt+40HO+RJ2J/UT+JnxBwRmk4HSreZHNoZSnFA==
Xref csiph.com comp.lang.javascript:39365

Show key headers only | View raw


Michael Haufe (TNO) wrote:

> On Friday, January 15, 2021 at 11:57:35 AM UTC-6, The Doctor wrote:
>> Got this form doing
>> a calculation as follows:
>>
>> [...]
>> 
>> WE are trying to add in fractional stuuf
>> 
>> put the fraction in this case is
>> coming out as 52.5.00 when it is suppose to pass
>> 52.50 ?
>> 
>> Given the above , how do I fix this?
> 
> TL/DR. Can you make this more succinct?
> 
> The mixing of PHP and JavaScript makes this painful to look through.

You can view it in/copy it to your favorite editor for syntax highlighting.
But I keep thinking that syntax highlighting in a newsreader would be really 
helpful.

Having had a quick look at the code, I have to say that they are doing 
virtually ALL things in the worst possible way (probably amateurs, but 
still).  Some highlights:

- all PHP code (not just template code, which can be forgiven) in the
  template
- mysqli instead of PDO (at least they didn’t use the old “mysql” module)
- SQL credentials in the source code *facepalm*
- SQL queries in the source code *facepalm*
- disabling the user’s status bar
- Fetching and displaying results row by row instead of in batches
- comparing strings as if they were numeric values :-D
- spaghetti code in event-handler attributes
- *inline* jQuery event listeners (so much for "unobtrusive Javascript") :-D
- jQuery “change” event listeners to uncheck a checkbox instead of canceling
  the “click” event :-D
- HTML5 declared, but not Valid HTML.
 
Bottom line: This code is complete JUNK.  It is a recipe for failure.
A hopeless case.  DOA.  It should be written from scratch before it is 
debugged, otherwise eye cancer and nervous breakdowns could result.

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

Back to comp.lang.javascript | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: Form processing issue "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2021-01-15 12:53 -0800
  Re: Form processing issue Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2021-01-16 00:44 +0100

csiph-web