Results 1 to 4 of 4

Thread: Javascript Help

  1. #1
    Join Date
    Oct 2006
    Location
    BUXTON
    Posts
    2,191
    Tokens
    0

    Latest Awards:

    Default Javascript Help

    I got his code

    HTML Code:
    <head>
    <script type="text/javascript">
    <!--
    function myPopup2() {
    window.open( "http://www.google.com/", "myWindow", 
    "status = 1, height = 300, width = 300, resizable = 0" )
    }
    //-->
    </script>
    </head>
    <body>
    <form>
    <input type="button" onClick="myPopup2()" value="POP2!">
    </form>
    </body>
    But u have to press a button how do i change it to a image?

    Moved by Agesilaus (Forum Moderator) from Designing & Development: Please post in the correct forum next time.
    Last edited by Agesilaus; 02-01-2008 at 11:09 AM.

  2. #2
    Join Date
    Jul 2005
    Location
    Belgium
    Posts
    2,492
    Tokens
    147

    Latest Awards:

    Default

    I think it was:

    could be wrong, I never use this

    HTML Code:
    <input type="image" src="path/to/link" onClick="myPopup2()" value="POP2!">
    that or simply give the button a class & do it in css using background image

  3. #3
    Join Date
    Apr 2005
    Posts
    4,614
    Tokens
    1,290

    Latest Awards:

    Default

    Code:
    <head>
    <script type="text/javascript">
    <!--
    function myPopup2() {
    window.open( "http://www.google.com/", "myWindow", 
    "status = 1, height = 300, width = 300, resizable = 0" )
    }
    //-->
    </script>
    </head>
    <body>
    <form>
    <a href="#"><img src="IMG URL" onClick="myPopup2()" border="0"></a>
    </form>
    </body>

  4. #4
    Join Date
    Oct 2006
    Location
    BUXTON
    Posts
    2,191
    Tokens
    0

    Latest Awards:

    Default

    Thanks! Ill try when my host back up +rep both If I can.

Posting Permissions

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