Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    javascript pop up help!

    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. display='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. display='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!!!

  • #2
    Regular Coder
    Join Date
    Apr 2012
    Location
    St. Louis, MO
    Posts
    985
    Thanks
    7
    Thanked 101 Times in 101 Posts
    It worked fine for me in Chrome.
    ^_^

    If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
    *
    The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,166
    Thanks
    75
    Thanked 4,338 Times in 4,304 Posts
    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.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #4
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,915
    Thanks
    15
    Thanked 227 Times in 227 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •