By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,567 Members | 1,185 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,567 IT Pros & Developers. It's quick & easy.

Problems with javascript in firefox

P: n/a
hi,
iam facing a problem in javascript. iam using a slider in program. i
requires a js file which i have included. iam passing a parameter
through this statement s.function(v). the function is in js file and
this keyword is used for eg. this._range=v this gives error in firefox.
can anyone let me know is this keyword causing problem or something
else

Sep 12 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
VK

kiran wrote:
iam passing a parameter through this statement s.function(v).
That would be an illegal statement as <functionis a JavaScript
keyword.
If you are doing something like:
var s = {'function':function(){window.alert('OK');}}
s.function();
then such syntax is not acceptable. If you indeed absolutely absolutely
have to have a method named "function" then you have to use squared
brackets notation:
var s = {'function':function(){window.alert('OK');}}
s['function']();
this keyword is used for eg. this._range=v this gives error in firefox.
can anyone let me know is this keyword causing problem or something
So what statement are having problem with? s.function() or
this._range=v ?

Sep 12 '06 #2

P: n/a

kiran wrote:
hi,
iam facing a problem in javascript. iam using a slider in program. i
requires a js file which i have included. iam passing a parameter
through this statement s.function(v). the function is in js file and
this keyword is used for eg. this._range=v this gives error in firefox.
can anyone let me know is this keyword causing problem or something
else
ok
as i have already told that iam using slider in my webpage
s is a slider object
iam calling s.getMaximum() function from my webpage. the get
maximumfuntion is defined in another js file. there in getMaximum
function
return this._range.getMaximum() is used

i get an error
Error: this._range has no properties

Sep 12 '06 #3

P: n/a
kiran wrote:
kiran wrote:
>hi,
iam facing a problem in javascript. iam using a slider in program. i
requires a js file which i have included. iam passing a parameter
through this statement s.function(v). the function is in js file and
this keyword is used for eg. this._range=v this gives error in firefox.
can anyone let me know is this keyword causing problem or something
else
ok
as i have already told that iam using slider in my webpage
s is a slider object
iam calling s.getMaximum() function from my webpage. the get
maximumfuntion is defined in another js file. there in getMaximum
function
return this._range.getMaximum() is used

i get an error
Error: this._range has no properties
It may help if we can see the script. Perhaps you could give us a link
to it or post it?
Sep 12 '06 #4

P: n/a
ASM
kiran a écrit :
iam passing a parameter
through this statement s.function(v).
....
gives error in firefox.
Generally the typical error when occurs in Fx and not in IE
is that the element hasn't an id

<img name="foo" ...>
could works with IE and not with Fx
if function addresses to an id

Firefox needs :

<img id="foo" ... >

Yo avoid this kind of error, always tape :

<img name="foo" id="foo" ... >
--
Stephane Moriaux et son [moins] vieux Mac
Sep 12 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.