PDA

View Full Version : pop up window question


rockgirl84
01-18-2010, 01:11 AM
Hi guys
Me and my friend are currently working on our first website. :-D
Up until now we have been able to direct ourselves through a few tutorials but got stuck.

Hope someone here can help us out. :sad:

Our question:

We managed to get the pop-up window going but somehow when the pop up window link is clicked the "parent" window will also reload itself :confused:
(our main window is a flash-based website.)

Can somebody please teach us how to stop it?

Thank you. XXX

edbr
01-18-2010, 01:50 AM
the usual way is to use javascript to open a new pop up windowso it depends on how you have tried to create it, post your code

rockgirl84
01-18-2010, 02:25 AM
we did it with the "behaviors" option
here is the code

<p align="center" class="style1"><a href="index.html" class="style3" style="text-decoration:none" onClick="MM_openBrWindow('/about.html','','scrollbars=yes,width=500,height=70 0');">Website made by.</a></p>

edbr
01-18-2010, 03:00 AM
sorry, i cant see anything there that will make your parent page refresh

gentleone
01-18-2010, 12:17 PM
Perhaps its an idea to use a jQuery or Prototype based modal window. Smashing Magazine has listed different ones.

http://www.smashingmagazine.com/2009/05/27/modal-windows-in-modern-web-design/

rockgirl84
01-18-2010, 03:20 PM
thanks for trying guys, i think we found the solution, it has something to do with adding a "return false" in the code.

It's working now :D :D :D .

Thanks with Love
XXX

domedia
01-20-2010, 02:10 PM
thanks for trying guys, i think we found the solution, it has something to do with adding a "return false" in the code.
That will make sure the window does not load the URL in the HREF attribute, this is how I do it as well.
By also changing the HREF attribute's value to the one used in the pop-up, the information is accessible if the JavaScript is not available or turned off.