Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > swfobject is undefined

Reply
Thread Tools

swfobject is undefined

 
 
TonnyD
Guest
Posts: n/a
 
      11-13-2007
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="clsid27CDB6E-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>

 
Reply With Quote
 
 
 
 
TonnyD
Guest
Posts: n/a
 
      11-14-2007
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

 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      11-14-2007
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
 
Reply With Quote
 
Doug Miller
Guest
Posts: n/a
 
      11-14-2007
In article <(E-Mail Removed). com>, TonnyD <(E-Mail Removed)> 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.
 
Reply With Quote
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      11-14-2007
Doug Miller wrote:
> [...] TonnyD <(E-Mail Removed)> 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/200..._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
 
Reply With Quote
 
TonnyD
Guest
Posts: n/a
 
      11-14-2007
Yea i missed that, but still not the problem

 
Reply With Quote
 
TonnyD
Guest
Posts: n/a
 
      11-14-2007
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.

 
Reply With Quote
 
Doug Miller
Guest
Posts: n/a
 
      11-14-2007
In article <(E-Mail Removed). com>, TonnyD <(E-Mail Removed)> 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/200..._wont_help_you

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

It's time to throw all their damned tea in the harbor again.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SWFOBJECT.JS Jeff Strickland Computer Information 3 03-01-2010 08:53 PM
SWFOBject problem on IE 6.0. K. Javascript 6 10-17-2007 06:37 AM
swfobject.js trig HTML 3 01-03-2007 11:51 AM
swfobject.js trig Javascript 0 12-21-2006 05:50 PM
undefined behavior or not undefined behavior? That is the question Mantorok Redgormor C Programming 70 02-17-2004 02:46 PM



Advertisments