www.webdeveloper.com
Results 1 to 2 of 2

Thread: Keep clicking a button

  1. #1
    Join Date
    Sep 2009
    Posts
    2

    Keep clicking a button

    I need to use javascript in a way in which it will keep clicking a button. The source code for that button is below:
    Code:
    <script type="text/javascript"> 
    function set_opacity(id, opacity) {
      element = document.getElementById(id)
      if (/MSIE/i.test(navigator.userAgent)) { element.style.filter='alpha(opacity='+opacity+')'; }
      else { element.style.opacity = opacity/100; }
      }
    </script> 
     
     
      <div class="recruiter_enabled"> 
        <table cellspacing="0" style="width: 100%"> 
          <tr> 
            <td> 
              
                <p> 
                  <script type="text/javascript"> 
    //<![CDATA[
    recruiter_clicks = 1
    //]]>
    </script><a href="/recruiter/recruit/3p5tjd4pdnbg0" id="recruit_link" onclick="return(submit_link_as_post_with_opacity(this, 'recruit_image'))"><img alt="" class="start_recruiting" id="recruit_image" src="/A.gif?1221518016" /></a><script type="text/javascript"> 
    //<![CDATA[
     
          link = document.getElementById('recruit_link');
          link_href = link.href;
          link.href = "#";
          set_opacity('recruit_image', 50);
          
          setTimeout("link = document.getElementById('recruit_link'); link.href = '" + link_href + "'; recruiter_clicks = 0; set_opacity('recruit_image', 100)", 2000);
        
    //]]>
    </script>
    Therefore, I need javascript to keep clicking the button until it has clicked it 375 times.

    How would I be able to do this?

  2. #2
    Join Date
    Sep 2009
    Posts
    2
    Anybody please?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles