Monday, February 7, 2011

passing url to iframe

I have links on the side of my page such as "home", "news", "contacts", ... and an iframe in the middle of the page, I would like the iframe to go to diffrent urls according to the link selected. Could I do this by only using html and/or how?

  • Give the iframe a name attribute, like this:

    <iframe name='content' ...>
    

    and then give each link a corresponding target attribute, like this:

    <a href='news.html' target='content' ...>
    
    Jonathan Sampson : ++; Beat me by 25 seconds ;)
    RichieHindle : @Jonathan: Ah, all those years at secretarial college are paying off!

0 comments:

Post a Comment