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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Sep 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Please help: iFrame / HTML

    Hey... I'm new, but I'm hoping someone can help me out. You'd save me from doing a huge redesign.

    Here's my problem:

    Navigation rollovers display an image to the left in an iFrame, when the navigation button is clicked for a certain page, that page loads in the same spot to the left in the same iFrame. The problem is when you move your mouse off the navigation after you've clicked for a page to load... once you move off the nav bar and if you happen to rollover anything else on the nav bar, the page that was loaded goes away and you go back to having the rollover images swapping. Hopefully this makes sense?
    Here's the link: www.mymodasalon.com

    Thanks for taking the time to read about my stupidity.

  • #2
    Regular Coder
    Join Date
    Sep 2007
    Location
    Raleigh, NC
    Posts
    273
    Thanks
    7
    Thanked 59 Times in 52 Posts
    Well ideally what would you like to happen then?

    To fix this you'd just need to implement some logic in Javascript, but we need to know what behavior you're after before we can help.

  • #3
    New to the CF scene
    Join Date
    Sep 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'd like for everything to work as-is, but without the minor problem of losing my page when you roll off the nav.

    I want the rollovers to display at left in the iFrame (as-is).
    I want the pages to load on click at left in the iFrame (as-is).
    I want the user to be able to move their mouse to the loaded page at right after they have clicked the page and for the page to still stay loaded and not have the rollover images come back.

    Does this make sense? I hope this is clear. Thanks for your reply!
    Last edited by suedecrush; 09-26-2007 at 06:01 AM.

  • #4
    Regular Coder
    Join Date
    Dec 2005
    Location
    Ohio
    Posts
    286
    Thanks
    7
    Thanked 9 Times in 9 Posts
    This may be a javascript issue because as long as there is an onmouseover event for those buttons, the script is going to do what it is supposed to do. There might be a php answer for this too, but that is not one of my strengths.

    How imperative is the iframe when the user actually clicks the link? Otherwise, you might be able to have a new page reload that loads and the onmouseover event is not present for the "selected" page in the iframe...but that would take away from some of the "sleekness" you have got there...

  • #5
    Regular Coder
    Join Date
    Sep 2007
    Location
    Raleigh, NC
    Posts
    273
    Thanks
    7
    Thanked 59 Times in 52 Posts
    So you only want the rollovers to happen if there is no content in the iFrame then? Then you'll need to modify the javascript similar to this:

    Code:
     var loaded = false
    
    function changeImage(id) {
      if (!loaded) {
          // do the image swap stuff
      }
    }
    And when you actually load a page you need to set that loaded flag to true so the rollovers don't happen.


  •  

    Posting Permissions

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