The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
It's often useful to open up a 'popup' window rather than take your visitors to a new page - great for displaying information quickly.
To create a simple popup window you need just two small bits of code.
1) JavaScript
Insert the following in the page :
<script type="text/javascript">
<!--function myopen(filename,windowname,properties) {
mywindow = window.open(filename,windowname,properties);}// -->
</script>
2) The LINK
Then all you need to do is create a link on your page to open the popup window.
Use the following code - just change the www address as required. The other options are mostly self-explanatory, all can be left as they are, but you might need to change the width and height, this will be the size of your popup - so it needs to be the right size for your content:
<a href="javascript:myopen ('http://www.yourwebiste.com/popup.htm', 'fgpopup',
'toolbar=no,location=no,directories=no,status=no,
menubar=no,scrollbars=yes, resizable=no,copyhistory=no,
width=400,height=300')" >Click to open Popup Window</a>
You're finished now, you can have as many 'popups' on a page as you like - just repeat the LINK code you only need the JavaScript once.
CLOSE link
...it's often useful to create a 'CLOSE' link on the popup window.
All you need to do is add this snippet:
<a href="javascript: window.close();">close window</a>
Another useful tip to help you find out how things work is to view the 'page source' which shows you the code. When you are on a site and like the way something works, try working it out by reading the code and copying/pasting. You can build a useful collection for your website building!
The observant will see that I've worked all this out from Freeola's own pages - the 'View the winners list' link on the left :¬)
Demo created here: Simple JavaScript popup window
Search Freeola Chat
It's surprising what you can cobble together when you try and nice that many things, like 'popup windows' can be re-used on others sites etc.
Search Freeola Chat
It's often useful to open up a 'popup' window rather than take your visitors to a new page - great for displaying information quickly.
To create a simple popup window you need just two small bits of code.
1) JavaScript
Insert the following in the page :
<script type="text/javascript">
<!--function myopen(filename,windowname,properties) {
mywindow = window.open(filename,windowname,properties);}// -->
</script>
2) The LINK
Then all you need to do is create a link on your page to open the popup window.
Use the following code - just change the www address as required. The other options are mostly self-explanatory, all can be left as they are, but you might need to change the width and height, this will be the size of your popup - so it needs to be the right size for your content:
<a href="javascript:myopen ('http://www.yourwebiste.com/popup.htm', 'fgpopup',
'toolbar=no,location=no,directories=no,status=no,
menubar=no,scrollbars=yes, resizable=no,copyhistory=no,
width=400,height=300')" >Click to open Popup Window</a>
You're finished now, you can have as many 'popups' on a page as you like - just repeat the LINK code you only need the JavaScript once.
CLOSE link
...it's often useful to create a 'CLOSE' link on the popup window.
All you need to do is add this snippet:
<a href="javascript: window.close();">close window</a>
Another useful tip to help you find out how things work is to view the 'page source' which shows you the code. When you are on a site and like the way something works, try working it out by reading the code and copying/pasting. You can build a useful collection for your website building!
The observant will see that I've worked all this out from Freeola's own pages - the 'View the winners list' link on the left :¬)
Demo created here: Simple JavaScript popup window
Search Freeola Chat