Jump to content

Playfair

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Playfair

  1. The jumping is probably caused by the hash character within the anchor tag's href attribute. These generally cause the page to jump to the top. You can prevent this however by returning false in the onclick attribute. Like so... <a href="#" onclick="return false;">example</a> or in your case... echo '<a href="#" onclick="document.getElementById(\'captcha\').src = \''.$this->Html->url(array('controller' => 'captcha','action' => 'index')).'\'; return false;">Reload?</a>'; I would have to agree with PoyBoy's advice regarding the use of jQuery. Its use would allow for a much nicer solution.
×
×
  • Create New...