LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-17-2009, 01:00 PM   #1
trscookie
Member
 
Registered: Apr 2004
Location: oxford
Distribution: gentoo
Posts: 463

Rep: Reputation: 30
javascript ie error fine on mozilla:


Hello all,

I am trying to create a website that is compatible for the most common browsers however smegging i.e. as always is causing a fuss about a particular function that I have on my page, the function starts:

Code:
function	mouseDown( name )
	{
	document.getElementById( name ).addEvents(
		{
and I.e. complains about: document.getElementById( name ).addEvents( reports it as error on line 9. the element ID that i pass in is the name of a "<div>" element. is there an IE friendly version for this?


the element is as follows:
Code:
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Mon, 17 Aug 2009 18:01:06 UTC


Message: Object doesn't support this property or method
Line: 9
Char: 2
Code: 0
URI: result.js
Many thanks in advance.

Last edited by trscookie; 08-17-2009 at 01:02 PM.
 
Old 08-17-2009, 02:17 PM   #2
trscookie
Member
 
Registered: Apr 2004
Location: oxford
Distribution: gentoo
Posts: 463

Original Poster
Rep: Reputation: 30
for those interested, i changed document.getElementById( name ).addEvents(


to

$(name).addEvents(
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use JavaScript on Mozilla? aiiiq Programming 3 05-03-2004 09:20 PM
Mozilla and Javascript redsea Linux - Software 6 04-11-2004 02:14 PM
how to let mozilla execut javascript??? gk_linux Linux - Software 2 11-23-2003 08:32 PM
javascript on mozilla abd_bela Linux - Software 2 07-27-2003 05:43 AM
javascript/mozilla wr3ck3d Linux - General 3 12-18-2002 02:13 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration