open multiple websites with javascript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • questionit
    Contributor
    • Feb 2007
    • 553

    open multiple websites with javascript

    Hi

    how can i write a javascript that will open multiple websites together.


    when the jaascript file is created and saved on the hard drive. when i double-click on it, it should open different websites that i type in the javascript code ?

    Thanks
    Qi
  • RamananKalirajan
    Contributor
    • Mar 2008
    • 608

    #2
    You can use window.open("") to open the url you want. Have a Button, onclick of the button trigger a function that will open 10 different windows with the url you want on it..

    Regards
    Ramanan Kalirajan

    Comment

    • prabirchoudhury
      New Member
      • May 2009
      • 162

      #3
      hey
      this may help you..

      How to read and write files in JavaScript

      Comment

      • questionit
        Contributor
        • Feb 2007
        • 553

        #4
        open websites automatically with javascript

        Thanks for reply. that was helpful

        but i do not want a button. instead when the HTML file is double-clicked, it should open the specified websites automatically, how to do that?

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          Use the onload event, though even that's not required if you call the JavaScript function within the body. You could avoid multiple windows, but that would be a bit more complex.

          Comment

          Working...