Javascript warning message

This is a discussion on "Javascript warning message" within the JavaScript Forum section. This forum, and the thread "Javascript warning message are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old May 17th, 2008, 23:41
New Member
Join Date: May 2008
Location: Orlando, FL
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Javascript warning message

Greetings,

I'm launching videos from a streaming server into an inline frame, and they play just fine. However, I am getting an irksome error message.

I've put the page here temporarily:

http://finchnest.org/give/videos.html

The error I get in Mozilla (not IE or Safari) are:

Deprecated method document.getSelection() called. Please use window.getSelection() instead.

The only place document.get appears is in the swfobject.js file. This is the source code for the script:

http://blog.deconcept.com/swfobject/swfobject_source.js

I have no clue what the warning means.

I'm on a tight deadline, any help would be greatly appreciated!
Reply With Quote

  #2 (permalink)  
Old May 18th, 2008, 00:27
CloudedVision's Avatar
Nerdy Moderator
Join Date: Feb 2008
Location: In My Own Little World
Age: 14
Posts: 1,152
Blog Entries: 9
Thanks: 2
Thanked 34 Times in 34 Posts
Re: Javascript warning message

i think the answer is pretty obvious: replace document.getSelection with window.getSelection. Try it and see if it works. (Make sure it also works with IE though)

Just a tip: Whenever you encounter a javascript error google it. You'll often get a forum post just like this one on how to fix it.
__________________
echo "Take it easy, ".$CloudedVision;
.links { site: other-road-design; blog: only-nerds-allowed; project: resource-fish; project-2: kapp; }
<quote>&quot;I think it's wrong that only one company makes the game Monopoly&quot; - <name>Steven Wright</name></quote>
Last Blog Entry: Hilarious Rapper (Jul 29th, 2008)

Last edited by CloudedVision; May 18th, 2008 at 00:28. Reason: Added tip
Reply With Quote
  #3 (permalink)  
Old May 18th, 2008, 00:53
saltedm8's Avatar
Lead Administrator
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,435
Blog Entries: 1
Thanks: 1
Thanked 6 Times in 6 Posts
Re: Javascript warning message

it should be as simple as cloudedvision says, but i do also know that it is only a firefox bug for 'older' code ( pre - 1.5.0.11 )

it will not affect any other browser

( i know nothing about javascript, but i did come across people asking about this error on forums a couple of times )
Last Blog Entry: Basic Advice for newbies (Feb 1st, 2008)

Last edited by saltedm8; May 18th, 2008 at 00:58.
Reply With Quote
  #4 (permalink)  
Old May 18th, 2008, 16:02
New Member
Join Date: May 2008
Location: Orlando, FL
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Javascript warning message

Alas, would that it were so simple. I now get a more severe error message when I do that, in addition to the previous 'warning'.

Error: this.params has no properties
Source File: http://finchnest.org/give/videos/swfobject.js
Line: 59

The code is not document.getSelection, it is document.getElement, and other document. code. It doesn't have getSelection anywhere.

The video pages that are called into the inline frame work fine stand-alone.

I'm at a complete loss, please help!
Reply With Quote
  #5 (permalink)  
Old May 18th, 2008, 16:23
CloudedVision's Avatar
Nerdy Moderator
Join Date: Feb 2008
Location: In My Own Little World
Age: 14
Posts: 1,152
Blog Entries: 9
Thanks: 2
Thanked 34 Times in 34 Posts
Re: Javascript warning message

Line 59 (and surrounding code) is this:

Code: Select all
addParam: function(name, value){
		this.params[name] = value;
	},
It seems like the reason is this.params has not been set.
__________________
echo "Take it easy, ".$CloudedVision;
.links { site: other-road-design; blog: only-nerds-allowed; project: resource-fish; project-2: kapp; }
<quote>&quot;I think it's wrong that only one company makes the game Monopoly&quot; - <name>Steven Wright</name></quote>
Last Blog Entry: Hilarious Rapper (Jul 29th, 2008)
Reply With Quote
  #6 (permalink)  
Old May 18th, 2008, 17:34
New Member
Join Date: May 2008
Location: Orlando, FL
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Javascript warning message

Thanks for trying to help, that error appeared only when I tried changing the code to window.get everywhere that document.get appeared. Unfortunately, I'm a designer, not a programmer. The code is straight from the JW FLV Media Player,

http://www.jeroenwijering.com/?item=JW_FLV_Media_Player

and I have posted on their forum (and several others) to no avail.

The player works just fine, the video appears correctly and plays when clicking one of the thumbnails, it's just that buggy message that is spoiling my day. If you try one of the thumbnail page by itself it works fine with no message, i.e.:

http://finchnest.org/give/videos/JQpretest.html

There's something about the relationship to the iframe is what I have concluded.
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 On

Similar Threads
Thread Thread Starter Forum Replies Last Post
ADO Security Warning?? bwalker ASP.NET Forum 2 Nov 14th, 2005 18:42
javascript alert message! Monie JavaScript Forum 7 Sep 29th, 2004 17:14


All times are GMT. The time now is 07:43.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43