Log in

View Full Version : Pop-Up Window



colrcrzy
06-26-2006, 06:36 PM
i need a pop up window to come up after a link is selected. anyone got the code for this? SUPER THANKS!

djr33
06-26-2006, 11:16 PM
Selected? Rollover? Clicked? The actual text of the link is selected?

As for a NEW window, just use <a ... target="_blank">

That will open a new browser window for any link.

As for a popup, you can google for a code... there are many versions.

Note, however, that, since I'm not sure what user input you are responding to (see top of post), that it may be blocked by popup blockers.
blockers usually only block autogenerated ones, or popups based on rollovers, etc.
Usually if it is a click by the user, the blocker will let it through.
So... if you are talking about a click, then this will likely work for you. If not, realize a very large portion of your audience may be blocking the popups.

soupdragon
06-28-2006, 07:55 AM
If you need a simple clickable popup window try this,

<SCRIPT type="text/javascript">
<!--hide

function newwindow()
{
window.open('Picture_1.htm','jav','width=650,height=450,resizable=yes');
}
//-->

<!--hide

function newwindow_1()
{
window.open('Picture_2.htm','jav','width=650,height=450,resizable=yes');
}
//-->


</SCRIPT>

<A HREF="javascript:newwindow()" ><img src="pictures\Pict0001.JPG" alt="image1" border="0" width=200 height=150></A>

<A HREF="javascript:newwindow_1()" ><img src="pictures\Pict0002.JPG" alt="image2" border="0" width=200 height=150></A>

Obviously change the image names and alt, place it in your code and your away.

Hope this helps

atanas1234
06-28-2006, 09:11 AM
There is a very nice program http://www.antssoft.com/index.htm it is Free trial, but when you run it several times it is enought to get the sorce and the idea how to write your own code.
but if you prever not to instal anyting just use this code:

Put this in the head of your HTML:

<script language="JavaScript">
function PopupMe(){
myleft=(screen.width)?(screen.width-800)/2:100;mytop=(screen.height)?(screen.height-600)/2:100;
settings='top=' + mytop + ',left=' + myleft + ',width=800,height=600,location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,fullscreen=no'
Login=window.open('http://quantuminfo.phys.uni-sofia.bg/secure/index.php','Login', settings);
Login.focus();}
</script>



And this in the Body:

<a href="javascript:PopupMe()">Click this link</a>




I need somthing else .Could anyone tell me how to make a download link
but i am not a specialist in making site so please could it be simple explanation.Thanks