swfobject is undefined

Discussion in 'Javascript' started by TonnyD, Nov 13, 2007.

  1. TonnyD

    TonnyD Guest

    Im trying to install this poll "poll4web". its a flash based poll. I
    have to incorperate this script into the page, but I keep getting a
    error that says "swfobject" if undefined. And on preview the plugin
    says the following; "Loading Error: Cant find settings xml file in
    this location: settings.xml specified in in your html file. Please
    make sure that 'settingsXML' and 'base' in your html file parameters
    are defined correctly"
    I have all the files uploaded to the site. folder is named "poll"

    Here is the script i have. What do you guys think the problem is?

    <html>

    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=windows-1252">
    <title>New Page 1</title>
    <script src"poll/swfobject.js" language="javascript"></script>
    </head>

    <body>

    <div id="flash" class="productBlock" style="padding:10px 4px 0px
    5px;margin:0px 0px 0px 0px"></div>



    <script type="text/javascript">
    var flash = new swfobject ("http://www.the-amt.com/poll/
    votingTool.swf", "flash", "200", "240", "8.0.0", "#E6EAF2")
    flash.addParam("wmode", "window");
    flash.addParam("base", "poll/");
    flash.addParam("align", "middle");
    flash.addVariable("settingsURL", "poll/settings.xml");
    flash.addParam("scale", "noscale");
    flash.write("flash")
    </script>

    </div>
    <p>
    &nbsp;</p>

    <p>
    <object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/
    swflash.cab#version=6,0,40,0" border="0" width="399" height="395">
    <param name="movie" value="http://www.the-amt.com/poll/
    votingTool.swf">
    <param name="quality" value="High">
    <embed src="http://www.the-amt.com/poll/votingTool.swf"
    pluginspage="http://www.macromedia.com/go/getflashplayer"
    type="application/x-shockwave-flash" name="obj1" width="399"
    height="395" quality="High"></object>
    </p>





    </body>

    </html>
    TonnyD, Nov 13, 2007
    #1
    1. Advertising

  2. TonnyD

    TonnyD Guest

    i was able to figure out the problem with the error on the plugin. I
    forgot to add the base URL. But i still cant figure out how to fix the
    problem with the error; "swfobject" if undefined. Still need help with
    that
    TonnyD, Nov 14, 2007
    #2
    1. Advertising

  3. TonnyD wrote:
    > Im trying to install this poll "poll4web". its a flash based poll.


    And how representative do you think could the poll result be? A result of a
    poll that requires two not universally available technologies already to be
    viewed, let alone being voted on?

    > I have to incorperate this script into the page, but I keep getting a
    > error that says "swfobject" if undefined. And on preview the plugin
    > says the following; "Loading Error: Cant find settings xml file in
    > this location: settings.xml specified in in your html file. Please
    > make sure that 'settingsXML' and 'base' in your html file parameters
    > are defined correctly"


    You should definitely RTFM.

    > I have all the files uploaded to the site. folder is named "poll"
    >
    > Here is the script i have. What do you guys think the problem is?
    >
    > [snipped invalid HTML]


    Whatever the real problem is, one part of the solution is using
    http://validator.w3.org/


    PointedEars
    --
    var bugRiddenCrashPronePieceOfJunk = (
    navigator.userAgent.indexOf('MSIE 5') != -1
    && navigator.userAgent.indexOf('Mac') != -1
    ) // Plone, register_function.js:16
    Thomas 'PointedEars' Lahn, Nov 14, 2007
    #3
  4. TonnyD

    Doug Miller Guest

    In article <>, TonnyD <> wrote:
    >
    >Here is the script i have. What do you guys think the problem is?


    ><script src"poll/swfobject.js" language="javascript"></script>


    Look carefully at this line. There's a character missing.

    --
    Regards,
    Doug Miller (alphageek at milmac dot com)

    It's time to throw all their damned tea in the harbor again.
    Doug Miller, Nov 14, 2007
    #4
  5. Doug Miller wrote:
    > [...] TonnyD <> wrote:
    >> Here is the script i have. What do you guys think the problem is?
    >>
    >> <script src"poll/swfobject.js" language="javascript"></script>

    >
    > Look carefully at this line. There's a character missing.


    And validation would have revealed the problem, indeed :)

    http://diveintomark.org/archives/2003/05/05/why_we_wont_help_you


    PointedEars
    --
    Anyone who slaps a 'this page is best viewed with Browser X' label on
    a Web page appears to be yearning for the bad old days, before the Web,
    when you had very little chance of reading a document written on another
    computer, another word processor, or another network. -- Tim Berners-Lee
    Thomas 'PointedEars' Lahn, Nov 14, 2007
    #5
  6. TonnyD

    TonnyD Guest

    Yea i missed that, but still not the problem
    TonnyD, Nov 14, 2007
    #6
  7. TonnyD

    TonnyD Guest

    wow found it. It was all because of a ">". Although I still have
    problems with the script. I keep getting undefined instead of numbers
    for the poll. Here is a link to the page. http://www.the-amt.com/new_page_1.htm
    It works when you vote, but when you hit refresh none of the
    information is saved. I dont know if any of you can help unless your
    familier with this script and the files. I sent an e-mail to the site
    that sales the product. If any one happends to know the issue that
    would be great. The files included are;

    init.php
    main.php
    settings.xml
    swfobject.js
    votingtool.swf


    Thanks for your help with my error.
    TonnyD, Nov 14, 2007
    #7
  8. TonnyD

    Doug Miller Guest

    In article <>, TonnyD <> wrote:
    >wow found it. It was all because of a ">". Although I still have
    >problems with the script. I keep getting undefined instead of numbers
    >for the poll. Here is a link to the page.
    > http://www.the-amt.com/new_page_1.htm


    From http://validator.w3.org/ :

    This page is not Valid HTML 4.01 Transitional!
    Result: Failed validation, 10 Errors

    http://diveintomark.org/archives/2003/05/05/why_we_wont_help_you

    --
    Regards,
    Doug Miller (alphageek at milmac dot com)

    It's time to throw all their damned tea in the harbor again.
    Doug Miller, Nov 14, 2007
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mantorok Redgormor
    Replies:
    70
    Views:
    1,724
    Dan Pop
    Feb 17, 2004
  2. trig

    swfobject.js

    trig, Dec 21, 2006, in forum: HTML
    Replies:
    3
    Views:
    645
    Travis Newbury
    Jan 3, 2007
  3. VK
    Replies:
    45
    Views:
    575
    Dr John Stockton
    Sep 12, 2006
  4. trig

    swfobject.js

    trig, Dec 21, 2006, in forum: Javascript
    Replies:
    0
    Views:
    75
  5. K.

    SWFOBject problem on IE 6.0.

    K., Oct 15, 2007, in forum: Javascript
    Replies:
    6
    Views:
    90
Loading...

Share This Page