mikemessiah Posted April 23, 2008 Share Posted April 23, 2008 Basically I have this: <a onclick="window.open(this.href,'Name','resizable=no,width=265,height=210'); return false;" href="<?php echo "mini2.php?id=$ID" ?>"> <?php if( $Photo2 == '' ) {echo "<img class=\"img-border1\" src=\"/images/no-pic.jpg\" width=\"60px\" height=\"45px\">";} else echo " <img class=\"img-border1\" src=\"mini2.php?id=$ID\" width=\"60px\" height=\"45px\"> "?> </a> Looks a little confusing I know I lack of coding skills is showing once again. It works... The only problem is that the people are clicking on another pic and it is opening in the same window and dissapearing behind the main window. Is there a way to make it pop up and close again or at least be brought to front when a second link is clicked? I dont think we can use this normal std javascript pop up <HTML> <HEAD> <TITLE>The Image Gallery</TITLE> <script language="Javascript"> function PopupPic(sPicURL) { window.open( "popup.htm?"+sPicURL, "", "resizable=1,HEIGHT=200,WIDTH=200"); } </script> </HEAD> <BODY bgcolor="#FFFFFF"> <a href="javascript:PopupPic('Image1.gif')">Image 1</a><br> <a href="javascript:PopupPic('Image2.gif')">Image 2</a><br> <a href="javascript:PopupPic('Image3.gif')">Image 3</a><br> </BODY> </HTML> because of the <a href="javascript:PopupPic('Image1.gif')">Image 1</a><br> mine would need to be <a href="javascript:PopupPic('<?php echo "mini1.php?id=$ID" ?>')"> which i dont think will work... cant be mixing javascript and php like that...? well i tested it and it didnt work lol... If someone has an Idea!! ??? ??? Please help !! Been driving me nuts... :-\ :'( Quote Link to comment Share on other sites More sharing options...
RichardRotterdam Posted April 24, 2008 Share Posted April 24, 2008 try not using js popups these things are a bit old fashioned try using lightbox or a simple div overlay that way you wont risk trouble with a popup blocker Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.