Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="ISO-8859-1" Message-ID: <8880046.SEqChMirdb@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Wed, 17 Aug 2011 20:31:16 +0200 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 7Bit Subject: Re: how to create (open) a dialog box Newsgroups: comp.lang.php References: <4e47a6c9$0$5046$ba620e4c@news.skynet.be> <4e491384$0$5047$ba620e4c@news.skynet.be> <1goi4799ucaicoqa1qtjemjfjk10ob5i68@4ax.com> <5e58e$4e4a0c54$d9a28722$3705@news.hispeed.ch> <1533594.qVoOGUtdWV@PointedEars.de> <4033706.4JQzZI6eRS@PointedEars.de> Followup-To: comp.lang.php MIME-Version: 1.0 Lines: 31 NNTP-Posting-Date: 17 Aug 2011 20:31:16 CEST NNTP-Posting-Host: 3af70a77.newsspool2.arcor-online.net X-Trace: DXC=G3BIKCZN9C9n`gW2MTm]<3A9EHlD;3Yc24Fo<]lROoR18kF Thomas 'PointedEars' Lahn wrote: >> Tim Streater wrote: >> > sheldonlg 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,