Welcome to Welcome to DNF.com™ - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars

If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.

Register Today on DNForum IT'S FREE!

Results 1 to 2 of 2
  1. #1
    Platinum Lifetime Member

    Join Date
    Oct 2005
    Posts
    82
    DNF$
    208
    Bank
    0
    Total DNF$
    208
    Donate  

    Javascript onLoad with iFrame Problem



    Hello All,

    The script which I am trying to use is to resize an iFrame on the main page of my site based on the height of the document:

    The script is as follows:
    <script type="text/javascript" language="Javascript1.2"> function setSize() {
    var innerDoc;
    if (document.frames)
    innerDoc = document.frames["I1"].document; //IE
    else
    innerDoc = document.getElementById("I1").contentDocument; //Mozilla
    document.getElementById("I1").height = innerDoc.body.scrollHeight;
    }</script>

    When I call it in the html or cfm file I use it as follows:
    td background="index_files/index_9.jpg">
    <iframe onLoad="setSize()" name="I1" id="I1" d="I1" src="index_files/main.htm" title="Main" frameborder="0" height="821" scrolling="no" width="100%">

    Whenever I try to validate this on any of the major sites for browser compatibility etc. I get the error that "here is no attribute "ONLOAD"."

    The URL of the site is: http://www.newburghschools.org

    Please let me know if anyone on here has any ideas.

    Any help is greatly appreciated !


  2. #2
    DNF Member

    Join Date
    Jan 2005
    Posts
    126
    DNF$
    2,849
    Bank
    0
    Total DNF$
    2,849
    Donate  

    Re: Javascript onLoad with iFrame Problem

    Have you tried just using the onload in the body tag? or.... maybe you could do something like:

    <body onLoad="document.getElementById('I1').onload='setS ize()'"

Similar Threads

  1. javascript and yahoo
    By sofy60 in forum Website Development and Design Discussion
    Replies: 1
    Last Post: 04-19-2005, 07:31 PM
  2. Adsense Problem
    By Stinos in forum DNForum PPC Templates
    Replies: 11
    Last Post: 03-19-2005, 05:07 AM
  3. SECURITY ALERT: Bogus Whois Problem Reports
    By Domagon in forum General Domain Name Discussion
    Replies: 2
    Last Post: 11-05-2004, 05:10 PM
  4. BIG Problem Accessing This Site
    By Duke in forum Gold Cafe
    Replies: 6
    Last Post: 09-21-2002, 03:27 PM

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
  •  

Domain name forum recommended by Domaining.com