|
We receive a lot of questions from our customers on how to make a list of presentations which can be opened on mouse click in a new or current browser window or popup. In this post I am going to give you some idea on how to make those links work your way.
Opening a presentation in a current browser window
Solution: add target=”_self” parameter into following HTML tag:
<a href=”pres.html” target=”_self”>Open in current window</a>
That’s what it will look like: Peugeot Concept Car
Opening a presentation in a new browser window
Solution: add target=”_blank” parameter into following HTML tag:
<a href=”presentation_name.html” target=”_blank”>Presentation title</a>
So we get the following: Promo
Opening a presentation in a popup window
Solution:
Add a simple JavaScript function to your HTML code. If exact dimensions of a new window are important, you can declare them in the function’s body:
<script>
function OpenWindow(url, title)
{
window.open(url, title, “resizable=0,width=954,height=620″);
}
</script>
Change a corresponding piece of HTML code into:
<a href=”#” onclick=”javascript:OpenWindow(’presentation.html’, ‘Popup window title’);”> Presentation title</a>
This will give us exactly what we need.
By the way, your presentations links can be displayed not only as an insipid list, but as images, too. In this case you need to put an <img src=”image path”> tag within <a>:
<a href=”#” onclick=”javascript:OpenWindow(’presentation.html’, ‘Popup window title’);”><img src=”thumbnail.jpg”/></a>
Thus your website visitors can click a presentation thumbnail to open it.
|