SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Member
    Join Date
    Jan 2008
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can Anyone Help With an IE error?

    My page, located at
    Code:
    buygasrebatecertificates.com
    is having some strange errors in IE.

    I get this message:
    Function Expected
    Line:1
    Character:1

    I'm sure there isn't an error on line one! Are all of IE's error reports this useless?

    Whatever the error is, it seems to affect the a javascript accordion on the page, making it not work in IE. It works fine in FF, and Safari.

    Perhaps it's a problem in the JavaScript?

    Could anyone maybe check it out and help me?
    I noticed that if I don't include the flash video, sometimes the error goes away, why would this be? I use Javascript to Include the flash video if the error comes from that.


    Here are all the JS files I link to in the head of my webpage:
    Code:
    buygasrebatecertificates.com/js/accordian.pack.js
    buygasrebatecertificates.com/js/FancyZoom.js
    buygasrebatecertificates.com/js/FancyZoomHTML.js
    buygasrebatecertificates.com/js/swfobject.js
    buygasrebatecertificates.com/js/base.js
    Here's the JS I use to include the video:
    Code:
    <script type='text/javascript'>
    var s1 = new SWFObject('player.swf','player','500','310','9');
    s1.addParam('allowfullscreen','true');
    s1.addParam('allowscriptaccess','always');
    s1.addParam('flashvars','&amp;file=FLVFILE.flv&amp;image=images/vid-bg.jpg&amp;skin=stylish.swf&amp;stretching=fill');
    s1.write('preview');
    </script>
    I had to remove the full URLS form the code box above cause Sitepoint won't let me post URLS yet.

    To get the accordion script to work I use this in my body tag:
    Code:
    <body onload="new Accordian('basic-accordian',5,'header_highlight'); setupZoom()">
    The "setupzoom" is for another script on the page.

    The accordion box is near the bottom of the page in the FAQ section.

    If anyone could help out that would be great!

  2. #2
    SitePoint Evangelist bals28mjk's Avatar
    Join Date
    Aug 2007
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My guess would be your not giving an arguement that google's swfObject function is expecting. I would read up on the swfObject and go from there.

    Cheers.

  3. #3
    SitePoint Member
    Join Date
    Jan 2008
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried including the video as a regular flash object embed, and it still causes the accordion script not to work, and there still is the same error in IE, I don't think the problem lies with the swfObject script. Perhaps the problem is in the accordion script? I don't know much about JS, but I'm trying to learn more.

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    The problem is the following file
    http://buygasrebatecertificates.com/js/base.js

    It doesn't show javascript code, but instead an error page.
    Error on line 1. Line 1 is not javascript. Javascript is expected but instead the browser is trying to interpret the html from the error page.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  5. #5
    SitePoint Member
    Join Date
    Jan 2008
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for pointing that out, I believe that was left over from a script I had originally planned to be in the site. I removed it, but IE is still giving me the same error. Any ideas?

  6. #6
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Yes, check that you're not seeing a cached version of the old page.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  7. #7
    SitePoint Evangelist bals28mjk's Avatar
    Join Date
    Aug 2007
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Whatever the error is, it seems to affect the a javascript accordion on the page, making it not work in IE. It works fine in FF, and Safari.
    Code:
    <body onload="new Accordian('basic-accordian',5,'header_highlight'); setupZoom()">
    Try removing the new keyword in the function call.

  8. #8
    SitePoint Member
    Join Date
    Jan 2008
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just tried that, no change.

  9. #9
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What version of IE are you seeing this in? I just checked it in IE6 and FF and there are no errors at all (well a couple of silly CSS warnings)

    The accordion menus work too but they are 'choppy' opening up

    edit: seems fine in IE7 standalone too

  10. #10
    SitePoint Member
    Join Date
    Jan 2008
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm using IE8, I also tried it in IE7 and it didn't work in either. I haven't tested it in IE6

  11. #11
    SitePoint Member
    Join Date
    Jan 2008
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got the page to work, all I did was iframe the video part. Crude fix, but at least it works now. Thanks to everyone who tried to help! Sitepoint rules!


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
  •