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


Groups > comp.lang.javascript > #27067

onclick and <a> tag question

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" <syntel@cox.net>
Newsgroups comp.lang.javascript
Subject onclick and <a> tag question
Date Wed, 18 Mar 2015 16:44:29 -0700
Lines 39
Message-ID <cmugv0Fep3qU1@mid.individual.net> (permalink)
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

Show key headers only | View raw


Hi:

    On my download site I have approx 25 download links similar to the 
following but simplified below:

<a id="i116" href="http://www.example.com/files/x116.zip" 
onclick="chkdld(this);">Download this file</a>

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

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


Thread

onclick and <a> tag question "Mel Smith" <syntel@cox.net> - 2015-03-18 16:44 -0700
  Re: onclick and <a> tag question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-03-19 03:47 +0100
    Re: onclick and <a> tag question "Mel Smith" <syntel@cox.net> - 2015-03-19 08:54 -0700
      Re: onclick and <a> tag question "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-03-19 18:29 +0100
        Re: onclick and <a> tag question "Mel Smith" <syntel@cox.net> - 2015-03-19 12:29 -0700
          Re: onclick and <a> tag question "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-03-19 21:29 +0100
            Re: onclick and <a> tag question "Mel Smith" <syntel@cox.net> - 2015-03-19 16:34 -0700
              Re: onclick and <a> tag question "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-03-20 01:28 +0100
                Re: onclick and <a> tag question "Mel Smith" <syntel@cox.net> - 2015-03-19 21:42 -0700
              Re: onclick and <a> tag question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-03-20 12:30 +0100
                Re: onclick and <a> tag question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-03-20 13:51 +0100

csiph-web