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 9 of 9
  1. #1
    New Coder
    Join Date
    Dec 2005
    Posts
    19
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Exclamation Problem with link to refresh iframe contents.

    Hi guys...

    I have a "small" problem concerning my website.
    Since my native language isn't English, I provided a screenshot to show you what problem I am having with my website.

    Take a look at this screenshot.

    The GREEN square indicates an iframe.
    The RED arrows are buttons, which (when clicked) should refresh the iframe with the appropiate content concerning that link.

    Anyways; I am having a hard trouble to make it work, like I want. Probably I am overlooking something.

    I simply can't manage to make the links (e.g. "nieuws" or "MSN") refresh the iframe with the correct contents.

    I hope you can understand what I mean and again I am sorry if I can't make myself clear on what I mean.

    Hopefully someone can help me out.

    Programs used:

    - Photoshop (and Imageready)
    - Dreamweaver (and Fireworks)

    Thanks.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Give the iframe a name
    Code:
    <iframe src="somepage.html" name="content"></iframe>
    then set the target of your links to the name of the iframe
    Code:
    <a href="someotherpage.html" target="content">Some other page</a>

  • #3
    New Coder
    Join Date
    Dec 2005
    Posts
    19
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by _Aerospace_Eng_
    Give the iframe a name
    Code:
    <iframe src="somepage.html" name="content"></iframe>
    then set the target of your links to the name of the iframe
    Code:
    <a href="someotherpage.html" target="content">Some other page</a>

    Damn that's it? Man I will try that immeadently; I have been bothered with this the last couple of hours.

    Thanks in advance, I will respond if it works (or not).

  • #4
    New Coder
    Join Date
    Dec 2005
    Posts
    19
    Thanks
    2
    Thanked 0 Times in 0 Posts
    It worked!

    Damn, now I really feel stupid that I didn't see this one coming.
    Oh well, blame it on the tough weekend I had. :S

    Thanks again mate.
    Highly appreciated.

  • #5
    New Coder
    Join Date
    Dec 2005
    Posts
    19
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Okay it seems to work perfectly in Internet Explorer.
    But it doesn't work with Mozilla Firefox...?

    In Firefox it opens a complete new page, instead of using the iframe.
    Any ideas on how to solve that as well?

    Thanks again in advance.

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    It should work in Firefox to. Post a link to your page, you may have some errors causing the problem, then again this could be a setting in your own browser.

  • #7
    New Coder
    Join Date
    Dec 2005
    Posts
    19
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Okay, here is a link to my website.

    E.g. click on "NIEUWS" and / or "MSN".

    In Internet Explorer it works without problems (opens in the frame, like it should), but in Mozilla Firefox it opens it in a new blank page?

    Thanks for looking at it.
    Last edited by HHawk; 12-05-2005 at 08:36 PM.

  • #8
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Lose the underscore in the name of the iframe. Make sure you change your targets as well. A name and/or id should not begin with an underscore it is invalid.

  • #9
    New Coder
    Join Date
    Dec 2005
    Posts
    19
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Bleh and I thought I was trying to be original with the underscore... :S

    Thanks again mate.


  •  

    Posting Permissions

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