Re: how to create (open) a dialog box [message #175156 is a reply to message #175147] |
Wed, 17 August 2011 18:31 |
Thomas 'PointedEars'
Messages: 701 Registered: October 2010
Karma:
|
Senior Member |
|
|
Tim Streater wrote:
> Thomas 'PointedEars' Lahn <PointedEars(at)web(dot)de> wrote:
>> Tim Streater wrote:
>>> sheldonlg <sheldonlg(at)thevillages(dot)net> wrote:
>>>> Wouldn't you use onsubmit only if you are submitting the entire page?
>>>> The onclick allows you to confirm the deletion, send off an AJAX
>>>> request, and still stay on the page.
>>>
>>> Yes. In my app I never submit any forms at all. Everything happens via
>>> onclick events and ajax.
>> IOW, your app cannot be used without client-side scripting, as "ajax"
>> requires that. With few exceptions, I would consider that bad software
>> design.
>
> So what should I replace my 15000 lines of javaScript with then? Magic?
You should rewrite your application so that it works with and without
client-side scripting. That design approach is called graceful degradation.
It is not hard to do (see my example) if you start from the premise that
client-side scripting is not available, instead of the opposite. And 15000
LOCs is probably too much client-side script code. You might want to ask
questions about parts of your code where it is on-topic.
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$8300dec7(at)news(dot)demon(dot)co(dot)uk>
|
|
|