Not signed in (Sign In)

Vanilla 1.0.3 is a product of Lussumo. More Information: Documentation, Community Support.

  1.  
    When I check for errors in Firefox I get the above message. It is a warning rather than an error, but I don't know how to fix it.

    I have noticed that if I use swfobject 1.4, it doesn't produce this error message.

    I noticed there is a fix to this which has something to do with the style attribute. But being a newbie, I don't actually understand what this means or how I should implement it. I am assuming I need to amend something in the swfobject.js file, but when I open it in notepad I don't really know where to begin. Any help would be much appreciated.
    • CommentAuthorphilip
    • CommentTimeJul 10th 2007
     
    you should use version 1.5, it fixes a big bug. you don't need to amend the swfobject.js file, it's fine.

    some people have reported that warning message, but i never get it on my pages... perhaps it's because i always have a style associated with my target div? i'm not sure. either way, the warning doesn't cause any failures, it's just a CSS style warning, so it can be safely ignored.

    while we're on the subject of styles, i recommend you eliminate your inline styles:

    <div id="swfFour" style="position: absolute; right: 120px; top: 242px; z-index: 1">


    and put them into your CSS at the top of the page:

    <style type="text/css">
    <!--

    body {
    background-color: #3d8999;
    }

    table.moominsback {
    position: absolute;
    width: 713px;
    height: 554px;
    left: 50%;
    top: 50%;
    margin-left: -360px;
    margin-top: -277px;
    }

    #swfFour {
    position: absolute;
    right: 120px;
    top: 242px;
    z-index: 1;
    }

    -->
    </style>

    [... then in your <body> ...]

    <div id="swfFour">
    <img src="smaidenpic.jpg" alt="" width="190" height="152" />
    </div>


    by the way, it's a good idea to get used to writing your <tags> all lowercase... XHTML requires it (i imagine HTML 5 will, too), and it makes for cleaner-looking code. :)

    - philip
  2.  
    My page is a bit complicated in that the elements are postioned within a table relatively to a div contained within the table and all subsequent divs are postioned absolutely, relative to the relative div, but within the table, which is itself absolutely postioned! Sorry my head hurts now!

    The above way you showed me is a lot neater. When I have time I will tidy it up again.

    Thanks again for your help.
    • CommentAuthorbennydtown
    • CommentTimeJul 28th 2007
     
    I get this warning on firefox 2.0.0.5 unless my target div actually has an inline "style" attribute.

    With this target div, I get the warning:
    <div id="flash_div">non-flash content</div>

    With this target div, I DO NOT get the warning:
    <div id="flash_div" style="">non-flash content</div>

    Annoying, because I'm styling that element by ID and have no need for an inline style, but it was the only way I could find to eliminate the warning.
    • CommentAuthorfusedev
    • CommentTimeAug 11th 2007
     
    I fixed this!!!!! I noticed this problem was being cause during the this.getAttribute('style') calls in the script. When the call was made and the element was undefined it would cause this error so I modified the function as follows and the error is finally gone.

    getAttribute: function(name){
    if (this.attributes[name] != undefined){
    return this.attributes[name];
    }else{
    return '';
    }
    }

    Hope this fixes the issue for all!

    JC
    • CommentAuthordyode
    • CommentTimeOct 4th 2007
     
    Anyone running into this issue should update the 1.5.1 version which can be downloaded here:
    http://blog.deconcept.com/swfobject/swfobject.js

    Not sure why Geoff hasn't updated the version in the main download link?
    • CommentAuthorGeoff
    • CommentTimeOct 5th 2007
     
    Sorry i'm lazy and haven't repackaged the new version yet....

    This is just a warning though, and not a js error, so your users won't see anything wrong with the page.