zozo zozo - 1 year ago 115
HTML Question

HTML - On one click open 2 pages

Good day to all.

I need to do this:

I have a text. When I click on it I must open 2 pages. No problem here... but the trick is that I am not allowed to use js. So... can you do this only with html?

Answer Source

Without JavaScript, it's not possible to open two pages by clicking one link unless both pages are framed on the one page that opens from clicking the link. With JS it's trivial:

<p><a href="#" onclick="window.open('http://google.com');
    window.open('http://yahoo.com');">Click to open Google and Yahoo</a></p>

Do note that this will be blocked by popup blockers built into web browsers but you are usually notified of this.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download