Anonymous
Anonymous asked in Computers & InternetProgramming & Design · 1 decade ago

Javascript question?

How can I open a new webpage with a javascript? I have the code already, but when they click "ok" in the window that appears, it opens another window as pop up with the script window.open. The problem is that I don't want the information bar telling that had bloqued a pop up and I want the other webpage loads in the same window.

Thanks

4 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    change the window.open to window.location.href ='url link';

  • 1 decade ago

    I would say use the window.open() funtion, however, your problem seems to be related to your browser blocking popups, which means you have to turn that feature off.

    However, this brings it own problems, because then you have to get all the users of your script to do the same thing....

    Sooo... I would try playing around with the page you are opening, and how you are opening it (the last parameter for open()), becuase some pop-up blockers may allow windows to open if they think that it is not an advertisement.

  • 1 decade ago

    <a href="#" onClick=window.open("YourPage.htm")>Your Text</a>

Still have questions? Get your answers by asking now.