...

View Full Version : javascript pop up help!



eileensiow
06-23-2012, 01:27 PM
I'm having a problem with my javascript pop up window. When i click on the button, a pop up window appears with content and buttons inside. When i click on the button inside the pop up window to go to another content, another pop up window appears.I don't want another pop up window to appear. I want the content to appear in that 1 and only pop up window that first appeared. I am not sure what I'm doing wrong but the following codes are below:



<div id="contest_area">

<div class="close_bttn">
<a href = "javascript:void(0)" onclick = "document.getElementById('contest_area').style.display='none';document.getElementById('fade').style.d isplay='none';">
<img src="images/close_bttn.png" />
</a>
</div>
<div style="margin-top: 0px; padding-left: 0px; position: absolute;">
<iframe src="treasure_hunt.php" frameborder=0 width="839" height="690" allowtransparency="true" scrolling="no" name="contest"></iframe>
</div>

<div id="contest_area">

<div class="close_bttn">
<a href = "javascript:void(0)" onclick = "document.getElementById('contest_area').style.display='none';document.getElementById('fade').style.d isplay='none';">
<img src="images/close_bttn.png" />
</a>
</div>
<div style="margin-top: 0px; padding-left: 0px; position: absolute;">
<iframe src="treasure_chest.php" frameborder=0 width="839" height="690" allowtransparency="true" scrolling="no" name="contest"></iframe>
</div>
</div>

You can view the test page here: http://imaginaryspaces.com/test/ by clicking on the CONTEST button,a pop up appears... In that pop up, click on TREASURE CHEST button, another pop up will appear which is wrong! it should load within the first pop up window!

Can anyone assist me? THANKS!!!

WolfShade
06-24-2012, 12:03 AM
It worked fine for me in Chrome.

Old Pedant
06-24-2012, 03:33 AM
Worked for me in FireFox 12.0

Worked in MSIE 9.

But man, is it SLOW SLOW SLOW!

I hope you find a faster server by the time you go live. I'd just close the window after waiting 30 seconds with no response if this were the real thing.

DrDOS
06-24-2012, 04:34 AM
You would probably be better off if you put the onclick events in a separate function and call it with onclick. Javascript doesn't seem to like more than one function in a tag call. You can put multiple calls, onclick, onmouseover, ect. but each for one function.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum