Opening Multiple Links at Once From Single Link or Button


How To Open Multiple Links at Once with a Single Click

Many times, we come across situation where we need more than one web pages to be opened together. Opening single link is easy but opening multiple windows with a single click is a bit tricky. Opening multiple links together is beyond the scope of  HTML and that's why we are going to use Javascript to open many links or windows together.

Opening Multiple links from a Single Hyperlink



If you are using Blogger, Go to Blogger >  Dashboard >Layout> Add Gadget > HTML widget
and add following code in the HTML gadget.

<script type="text/javascript">
function open_win() {
window.open("http://blogshippo.blogspot.com/2011/10/how-to-make-perfect-blogger-blog.html")
window.open("http://blogshippo.blogspot.com/2011/10/bloggers-typical-common-mistakes-avoid.html")
window.open("http://blogshippo.blogspot.com/2011/09/edit-blogger-template-new-interface.html")
}
</script>


You can add more links like this using window.open(" ") command. These all links will open together.
Now if you want these web pages to open after clicking a link then use following code.

<a href="javascript:open_win()">Click here to open Multiple websites</a> 

If you want an image to be hyper linked and want these web pages to open after clicking an image then use following code.

<a href="javascript:open_win()"><img border="0" src="http://3.bp.blogspot.com/-5gZ6B-R-H5w/ToIitOc-ZjI/AAAAAAAAAc0/ipM8ICvy9b0/s200/view-demo.png" width="200" /></a>

Opening Multiple Links Demo

DEMO LINK

How To Open Multiple Links at Once with a Single Click

Many times, we come across situation where we need more than one web pages to be opened together. Opening single link is easy but opening multiple windows with a single click is a bit tricky. Opening multiple links together is beyond the scope of  HTML and that's why we are going to use Javascript to open many links or windows together.

Opening Multiple links from a Single Hyperlink



If you are using Blogger, Go to Blogger >  Dashboard >Layout> Add Gadget > HTML widget
and add following code in the HTML gadget.

<script type="text/javascript">
function open_win() {
window.open("http://blogshippo.blogspot.com/2011/10/how-to-make-perfect-blogger-blog.html")
window.open("http://blogshippo.blogspot.com/2011/10/bloggers-typical-common-mistakes-avoid.html")
window.open("http://blogshippo.blogspot.com/2011/09/edit-blogger-template-new-interface.html")
}
</script>


You can add more links like this using window.open(" ") command. These all links will open together.
Now if you want these web pages to open after clicking a link then use following code.

<a href="javascript:open_win()">Click here to open Multiple websites</a> 

If you want an image to be hyper linked and want these web pages to open after clicking an image then use following code.

<a href="javascript:open_win()"><img border="0" src="http://3.bp.blogspot.com/-5gZ6B-R-H5w/ToIitOc-ZjI/AAAAAAAAAc0/ipM8ICvy9b0/s200/view-demo.png" width="200" /></a>

Opening Multiple Links Demo

DEMO LINK

Was that useful? Why not share it?

By: