Need help with a simple click code

Discussion in 'Programming' started by dirtbike35, Feb 13, 2009.

  1. #1
    Hey. I am wondering if someone would like to help me with a quick line of code... I want it to excute a url once anything is clicked on the index page, like once anything is clicked it has a Pop-up type window. It's a url that i want to pop-up...Thanks
     
    dirtbike35, Feb 13, 2009 IP
  2. Dox5

    Dox5 Peon

    Messages:
    35
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I think you could do what you want with javascript by using:

    <script type='text/javascript'>
    <!--
    function Start()
    {
    var show = window.open("http://www.somesite.domain", "Nameofwindow" , "width=550, height=500" )
    }
    
    //-->
    </script>
    Code (markup):
    add that to the head
    and then put this in your body tag
    
    <body onclick("Start")>
    
    HTML:
    If you only wanted to have it open the window once, you would have to add an if statement, you didn't make that clear for me.

    Hope that helps
    Dox
     
    Dox5, Feb 13, 2009 IP
  3. shahpari

    shahpari Active Member

    Messages:
    121
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #3
    u can use this html tag
    syntax:

    <a href=here written ur redirecting page> </a href>
     
    shahpari, Feb 14, 2009 IP