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


Groups > comp.lang.javascript > #20297

Button doing work as a hot link ??

From "Mel Smith" <med_cutout_syntel@aol.com>
Newsgroups comp.lang.javascript
Subject Button doing work as a hot link ??
Date 2013-06-14 20:36 -0600
Message-ID <b222a4F6mg4U1@mid.individual.net> (permalink)

Show all headers | View raw


Hi:

    I'll be placing a 'hot link' on my developing page.

    But, I wish it to be a *button* (rather than an anchor <a   >) whereby I 
can capture the 'click', then do my 'click-counting' and other work, then 
send the hot-link on its way to fruition.

    I googled around and found that the following code that looks promising, 
but I couldn't get it to work.

    In IE8 nothing happened after the click. With Chrome and FF the screen 
cleared but went to sleep.

    Is there something obvious I'm doing wrong ?

    btw, I've now forgotten where I found this code :(

    Below is a stripped-down version of what I'm trying (& failing) to do.

Thank you.

-Mel Smith


************************************
HTML:

<div id="ihoturl">
<form id="ihotlink" action="http://www.google.com">
<input type="button" onclick="gohotlink()" value="Visit the WebSite" />
</form>
</div>

JS:

function gohotlink() {
var linkobj = getobj("ihotlink") ;
linkobj.submit() ;
}

********************************** 

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


Thread

Button doing work as a hot link  ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2013-06-14 20:36 -0600
  Re: Button doing work as a hot link  ?? Denis McMahon <denismfmcmahon@gmail.com> - 2013-06-15 06:05 +0000
    Re: Button doing work as a hot link  ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2013-06-15 08:53 -0600
    Re: Button doing work as a hot link  ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2013-06-15 10:35 -0600
  Re: Button doing work as a hot link  ?? "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2013-06-15 11:53 +0300
    Re: Button doing work as a hot link  ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2013-06-15 09:10 -0600
      Re: Button doing work as a hot link  ?? "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2013-06-15 19:23 +0300
        Re: Button doing work as a hot link  ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2013-06-15 13:09 -0600
  Re: Button doing work as a hot link  ?? JJ <duh@nah.meh> - 2013-06-15 17:49 +0700
    Re: Button doing work as a hot link  ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2013-06-15 09:27 -0600
      Re: Button doing work as a hot link  ?? "ViLco" <villiber@tin.it> - 2013-07-09 10:24 +0200
        Re: Button doing work as a hot link  ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2013-07-09 09:50 -0600
          Re: Button doing work as a hot link  ?? "ViLco" <villiber@tin.it> - 2013-07-10 13:39 +0200

csiph-web