Results 1 to 3 of 3

Thread: Click Button/Image alternative

  1. #1
    Join Date
    Aug 2011
    Location
    Rep Of Ireland
    Posts
    126
    Thanks
    24
    Thanked 3 Times in 1 Post

    Arrow Click Button/Image alternative

    I use the following code to provide a button that refreshes a captcha image that a visitor may not be able to read.

    Code:
    <SCRIPT LANGUAGE="JavaScript">
        <!-- Begin
        document.write('<input type=button value="Get new Code" onClick="history.go()">')
        //  End -->
        </script>
    I now wish to use a refresh <img src="refresh.jpg"> image as an alternative to the button to refresh the captcha image.
    Can the <img src="refresh.jpg"> be incorporated into the Javascript as shown above?

  2. #2
    Join Date
    Aug 2011
    Location
    both, Germany and Bulgaria
    Posts
    54
    Thanks
    14
    Thanked 10 Times in 10 Posts

    Lightbulb

    Hi,

    I'm not 100% sure, what are you looking for, but what about the normal way:

    Code:
    <img src="refresh.jpg" onclick="history.go()" alt="Get new Code" />
    or

    Code:
    <a href="#" onclick="history.go()">
        <img src="refresh.jpg" alt="Get new Code"/>
    </a>
    ... and you can insert everything into your document, using document.write().
    It is another question, why you are doing it this way... ?!

    Cheers

  3. The Following User Says Thank You to XManBG For This Useful Post:

    Webiter (08-10-2011)

  4. #3
    Join Date
    Aug 2011
    Location
    Rep Of Ireland
    Posts
    126
    Thanks
    24
    Thanked 3 Times in 1 Post

    Default

    Thanks XmanBG,

    Your first code example done the trick. The image attached should answer your question - the installation of the refresh code arrow.

Tags for this Thread

Bookmarks

Posting Permissions

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