Make A Poppup Window


Okay, first to make a poppup window in a button you put this where ever you want the poppup link to be:

JavaScript Code
  1. <input type="button" Value="yournamehere" ONCLICK="window.open('yoururlhere.html', 'Sample', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=500,height=500')">


You have to edit it so it fits your site...
Now you can also make an image-link poppup window, first, put this in the <head> tag of your page:

JavaScript Code
  1. <script language="javascript" type="text/javascript">
  2. //<!--
  3. function popup()
  4. { window.open ("URLHERE.html","popup","width=400,height=400,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=1,toolbar=0") }
  5. -->
  6. </script>

Edit URLHERE.html to the URL of the page you want your image link to link to.

Now put this where ever you want the image link to be:

JavaScript Code
  1. <a href="javascript:popup()"><img src="rmborwhatever.gif" border=0 width="40" height="40" alt="Image Description Here"></a>


You have to edit it to fit your details.

Also, if you want just a plain text to go to a poppup window, use this:

JavaScript Code
  1. <a href="javascript:popup()">Click here for popup window"</a>


You can position your window anywhere you want it to appear by adding left and right positioning numbers to any of the codes above:

JavaScript Code
  1. { window.open ("blah.html","popup","width=yourwidth,height=yourheight,location=0,menubar=0, resizable=0,scrollbars=0,status=0,titlebar=1,toolbar=0 , left=your number here, top=your number here") }
vb_king's Avatar
Author:
Views:
2,146
Rating:
Posted on Wednesday 18th July 2007 at 02:46 PM
ray230
ray230's Avatar
Someone post an example of what it does