SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast erickkz's Avatar
    Join Date
    Dec 2005
    Location
    Earth
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question changing content constantly with iframes

    Hi everyone!

    I have one page index.php that contains one iframe:

    <iframe name="mainline" width="100%" height="100%" src="test.php">
    </iframe>

    What I want is change the content constantly of test.php with buttons placed in index.php. The contents could be tables and svg code.

    Which are the parameters to write in a iframe from a main window?

    document.mainline.write("tables or svg code")????

    I'm using FF and IE

    thanks in addvance !

  2. #2
    SitePoint Wizard chris_fuel's Avatar
    Join Date
    May 2006
    Location
    Ventura, CA
    Posts
    2,750
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    change name to id, then for whatever button you have (let's assume image here):

    HTML Code:
    <img src="whatever.jpg" alt="whatever" onclick="document.getElementById('mainline').src='somethingelse.php'"/>


Bookmarks

Posting Permissions

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