SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2010
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post Help me With javascript - Auto button!!!

    Help me With javascript - Auto button!!!
    I have a file 1.htm, this file writed as
    ---------------------
    1.html


    <script>
    function m() {
    win=window.open("http://google.com ","linhpr1");
    }
    </script>
    <input type="button" onclick=m(); value="button">



    I want to when run file 1.htm by FireFox.
    I don’t need click the “button” then the page : http://google.com can open with tab name linhpr1.Like when I click to the “button”
    Help me !
    Thanks everyone very much!

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,684
    Mentioned
    100 Post(s)
    Tagged
    4 Thread(s)
    Are you taking the same course as the chap in this thread? http://www.sitepoint.com/forums/java...es-767365.html
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2010
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i tried with body onload , but this function don't run
    <body onload="m()">

    HELP ME!

  4. #4
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,189
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Could you please post your full code as the snippets you posted don't paint a clear picture.


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
  •