Iframe Trouble 50 Creds

Discussion in 'Gaming' started by Painore, Sep 20, 2006.

  1. Painore

    Painore Well-Known Member

    Age:
    54
    Posts:
    556
    Likes Received:
    0
    Joined:
    Apr 25, 2004
    Location:
    New Zealand
    I need to know what code to use on the link to open the iframe and what code to put into the body of the iframe. im trying to do multiple frames In the same body, but i want them to open ONLY when i hit the link for em.
    This is what i have right now and it obviously isnt working for me.

    <a href="/game.html" target="GAME" </a> and
    <a href="/music.html" target="MUSIC" </a>
    for the links

    and

    <iframe name="GAME" src ="game.html" height="100%" width="100%"> <iframe name="MUSIC" src ="music.html" height="100%" width="100%"> </iframe>

    for the body. What am I doing wrong?
     
  2. sgsiaokia

    sgsiaokia Well-Known Member

    Posts:
    1,305
    Likes Received:
    0
    Joined:
    Jun 20, 2006
    did you close the first iframe ? >>> <iframe name="GAME" src ="game.html" height="100%" width="100%">
     
  3. Painore

    Painore Well-Known Member

    Age:
    54
    Posts:
    556
    Likes Received:
    0
    Joined:
    Apr 25, 2004
    Location:
    New Zealand
    I have tried


    <iframe name="GAME" src ="game.html" height="100%" width="100%"> </iframe>
    <iframe name="MUSIC" src ="music.html" height="100%" width="100%"> </iframe>

    and

    <iframe name="GAME" src ="game.html" height="100%" width="100%" iframe name="MUSIC" src ="music.html" height="100%" width="100%" </iframe>

    I just cant figure it out.. I want the game one to show up on the main page and then when i click a link on the navigation bar have it open up the other iframe and close the game one.


    As for the link, I dont have a clue on that. =/
     
  4. Painore

    Painore Well-Known Member

    Age:
    54
    Posts:
    556
    Likes Received:
    0
    Joined:
    Apr 25, 2004
    Location:
    New Zealand
    Anyone?
     
  5. .//XeN-

    .//XeN- Well-Known Member

    Age:
    33
    Posts:
    1,387
    Likes Received:
    0
    Joined:
    Sep 18, 2005
    So basically what you want to do is have the newly clicked link content open in the same place as GAME content?
     
  6. Painore

    Painore Well-Known Member

    Age:
    54
    Posts:
    556
    Likes Received:
    0
    Joined:
    Apr 25, 2004
    Location:
    New Zealand
    Yeah, one main body.. You go to the site.. lets say my site is astrocreep.ac.com. I want the main page just to have regular html content in the middle. Then my links to the left open up the iframes in the body.
     
  7. .//XeN-

    .//XeN- Well-Known Member

    Age:
    33
    Posts:
    1,387
    Likes Received:
    0
    Joined:
    Sep 18, 2005
    Code:
    <iframe src="whateveryouwantittostarton.html" name="main" width="600" marginwidth="0" height="430" marginheight="0" align="middle" scrolling="auto">
    
    <a href="whateverthepersonhasclickedon.html" target="main">[img]images/index_17.gif[/img]
    Right I'm just using this as an example from a template I made.

    Basically, you have to make one iFrame and name it (in this example it's called main) then for every "link" to something new for the iFrane you have to set the target as the iFrame's name.

    Hope that helps :D
     
  8. Painore

    Painore Well-Known Member

    Age:
    54
    Posts:
    556
    Likes Received:
    0
    Joined:
    Apr 25, 2004
    Location:
    New Zealand
    so in the source space that will be my website addy? or the .html file that i want loaded into the iframe?

    i tried kinda what you are showing right here, I named both but the frames loaded one on top of the other..

    Im at school right now so the second i get home ill punch it in. hopegull it works
     
  9. sgsiaokia

    sgsiaokia Well-Known Member

    Posts:
    1,305
    Likes Received:
    0
    Joined:
    Jun 20, 2006
    what browser are u using to test the iframe ?
     
  10. Painore

    Painore Well-Known Member

    Age:
    54
    Posts:
    556
    Likes Received:
    0
    Joined:
    Apr 25, 2004
    Location:
    New Zealand
    i am testing in both Deer park/Mozilla and IE
     
  11. .//XeN-

    .//XeN- Well-Known Member

    Age:
    33
    Posts:
    1,387
    Likes Received:
    0
    Joined:
    Sep 18, 2005
    The thing you've got to do is only make one frame ;)
    Then just set everything else so their target is in the iFrame instead of in a new window/same window.

    The iFrame source is whatever page you want to be loaded first.
     
  12. Painore

    Painore Well-Known Member

    Age:
    54
    Posts:
    556
    Likes Received:
    0
    Joined:
    Apr 25, 2004
    Location:
    New Zealand
    .... still cant get it, is this the right iframe dealio you were talking about?

    <iframe name="MAIN" src="main.html" width="100%" height="100%" frameborder="0" scrolling="auto" allowautotransparency=true><name="GAME" src="game.html></iframe>
     
  13. Abet

    Abet Senior Member

    Posts:
    4,338
    Likes Received:
    0
    Joined:
    Oct 9, 2004
    I don't think you seem to be getting the concept/idea of which he is explaining. I can try to help you out tomorrow if it has not yet been done.
     
  14. Painore

    Painore Well-Known Member

    Age:
    54
    Posts:
    556
    Likes Received:
    0
    Joined:
    Apr 25, 2004
    Location:
    New Zealand
    yeah, still trying to figure it out
     
  15. Painore

    Painore Well-Known Member

    Age:
    54
    Posts:
    556
    Likes Received:
    0
    Joined:
    Apr 25, 2004
    Location:
    New Zealand
    bump....
     

Share This Page