Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Mel Smith" Newsgroups: comp.lang.javascript Subject: onclick and tag question Date: Wed, 18 Mar 2015 16:44:29 -0700 Lines: 39 Message-ID: X-Trace: individual.net STSp0dIPrlyncF7Jdz0RKwIP+cNOHaVTSMXIhxPaLvYyXbFI1E Cancel-Lock: sha1:+T2NO1lxZ9b7pu8utJ41eKBhSuk= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: csiph.com comp.lang.javascript:27067 Hi: On my download site I have approx 25 download links similar to the following but simplified below: Download this file Note that I have 'clickable' link and also an onclick attribute/property ! I have determined that on IE8 (at least) that the onclick operation occurs first and then the 'download' operation follows after the chkdld() function returns either a true or false. Question: Is this sequence (i.e., 'onclick' followed by 'download operation') generally true across most all current common browsers. ?? Reason: I hope to use the 'onclick' sequence to start up an Ajax operation to determine the IP address info of the user, and then send a text response to modify the 'files' sub-directory to point to the *actual* download sub-dir -- which I modify frequently. Recently, on request I've eliminated use of passwords and, instead, am keeping a database of 'abusers' of my free service who typically start up dozens of simultaneous downloads to try to overwhelm my server. Because my actual download sub-dir changes frequently, I thought I could use Ajax to send the *actual* 'files' sub-dir as a response at thelast moment, then perhaps I could (somehow) revert it later after the download is started -- but I don't know how to do this yet (i.e., the 'reverting'). Thanks ! -Mel Smith