Web Analytics Made Easy -
StatCounter Changing object data - CodingForum

Announcement

Collapse
No announcement yet.

Changing object data

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Changing object data

    I have a page that has an object on it that displays the other pages on my site, like an Iframe without the Iframe.
    Code:
        <object id="main" data="blank.html" type="text/html" style="position:absolute; top:80; width:100%; height:100%; border:none 0 white">
          [Your Browser Does Not Handle OBJECTs, Sorry! Please update your browser, or try anouther browser.]
        </object>
    Here is the function that runs on a click of one of the links.
    Code:
    function changeToRep(){
    document.getElementById('main').data="MassToRep.html"
    }
    I'm trying to get the object to work like a frame by changing the data= part. Can this be done with an object?

  • #2
    An iframe is an object, and is designed for what you're trying to immitate with another object that is less well suited/supported for that purpose, so...
    hmm... ?

    Comment


    • #3
      I had an Iframe but does not work/show up in FireFox.

      Comment


      • #4
        Well, I'd guess that FireFox may be less forgiving with syntax errors, before guessing that it doesn't support iframe; but have no way of knowing...
        hmm... ?

        Comment


        • #5
          If you put

          <iframe>
          The browser does not support IFrame
          </iframe>

          Does the text show in FireFox?
          If it doesn't, then iframe is supported and probably there are errors that are causing the iframe not to be shown, as swmr pointed out.
          Glenn
          vBulletin Mods That Rock!

          Comment


          • #6
            Oh geez. This is hurting my head.
            Code:
            <iframe id="Main" src="blank.html" style="position:absolute; top:80; width:100%; height:100%; border:none 0 white">
            Not supported by your browser
            </iframe>
            Nothing shows up here. It is suppose to be a white blank page. But it's not. I have a file called blank.html in the same folder. I tried http://www.google.com, and it worked. So apparently I need the http://www. in there but that is not the link to the page I want to show.....

            Comment


            • #7
              So what did you see in the iframe if it's not a white blank page? Try putting some text inside blank.html
              Glenn
              vBulletin Mods That Rock!

              Comment

              Working...
              X