Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: onload

  1. #1
    New Coder
    Join Date
    Jun 2006
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    onload

    Hi! How can I make this show on the onload event?

    <a href="123.html" target="_blank" rel="workplace" onclick="return TB_show('', this.href, false);">

    It works onclick, while it is a link, but not at onload

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    You could try something like this but what does function TB_show do?

    <script type="text/javascript">

    onload=function openWin(url){
    newWin=window.open(url)

    TB_show('', url, false)
    }

    </script>
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.

  • #3
    New Coder
    Join Date
    Jun 2006
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It didn't work, it just gave me somer error in alert box.

  • #4
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Try this, you still have not told me what function TB_show() does, thats probably what is causing the error

    <script type="text/javascript">

    onload=function openWin(){
    newWin=window.open("123.html")

    TB_show('', url, false)
    }

    </script>
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.


  •  

    Posting Permissions

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