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 4 of 4
  1. #1
    New Coder
    Join Date
    Aug 2006
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    is this possible? iframes and javascript

    does anyone know of a way to make the innerHTML of an iframe (<iframe>this stuff here</iframe>) the content that is displayed and not a src? like

    document.getElementById("iframe").innerHTML = "Some html"

    I need an object that works like an iframe with a scrollbar but just displays data on that page. It also has to include links so a textarea is out. anyideas? Thanks in advanced.

  • #2
    Senior Coder
    Join Date
    Feb 2006
    Location
    USA
    Posts
    1,013
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The text inside an <iframe> is only displayed if the browser doesn't support <iframe>s.

    You seem to lack the knowledge that CSS can be used to give an element a scrollbar.
    Learn CSS. | SSI | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions
    Java != JavaScript && JScript != JavaScript
    Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around.

  • #3
    Regular Coder
    Join Date
    Sep 2005
    Posts
    535
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Use a <div>.... and set it's overflow style for the scrollbars.
    If you want answers, write a smart question.

    Yes, someone probably does know how...

    Oh, and if you want to learn, STFW!

  • #4
    New Coder
    Join Date
    Aug 2006
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks! your right i had no idea that css had that kind of capibility.


  •  

    Posting Permissions

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