473,624 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problems with javascript in firefox

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
4 1595
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':fun ction(){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':fun ction(){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

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.get Maximum() is used

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

Sep 12 '06 #3
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.get Maximum() 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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3022
by: Sjaakie | last post by:
Hi there, I'm trying to get this working with Firefox. Can you point out what's wrong? No problems with IE, Firefox doens't fill selMonth... TIA >>> the script... >>> <select name="selDay" id="selDay" style="width:50;" ></select> - <select name="selMonth" id="selMonth" style="width:50;"></select> -
5
4319
by: Andrea | last post by:
I am trying to alter css using javascript as well as use the innerHTML function. I have pasted below 3 forms that access getElementById in slightly different ways (I wanted to rule out that it was the method.) All 3 work fine on IE but only work momentarily on Firefox. For example, one form has text that changes from red to black when the user clicks the button. In IE it changes. In Firefox it changes for a split second then goes back...
12
2040
by: Brad | last post by:
Does anyone have any other solutions to the Firefox rendering problems with ASP.NET? I've tried the <browsercaps> web.config trick. It didn't work. Am I overlooking something else? Thanks!
10
19158
by: Danny | last post by:
Hi all, I am having some odd problems with AJAX on Firefox (1.5). When I use GET as the request method everything works ok, but when I do a POST the remote function doesn't get the parameters I am passing to it. Everything works fine on IE 6. Here's a couple samples of what I am doing: // using GET url = 'http://www.myserver.com/cgi-bin/funct?key1=value1&key2=value2'
12
2064
by: shafiqrao | last post by:
Hello everyone, I have a script that runs in IE great, but in firefox it has problems. I understand that there are some objects that are accessed differently in IE and Mozilla. Can anybody let me know what I need to change in the file to make a copy that would run fine on Firefox? Here is the link to the file: http://people.emich.edu/srehman2/study/polls.html click on the 'Build Bars' link displayed at the top-right corner. I am...
14
5919
by: Arne | last post by:
A lot of Firefox users I know, says they have problems with validation where the ampersand sign has to be written as &amp; to be valid. I don't have Firefox my self and don't wont to install it only because of this, so I hope some of you gurus can enlighten me with this :) In what circumstances can the "&amp;" in the source code be involuntary changed to "&" by a browser when or other software, when editing and uploading the file to the web...
2
17074
by: cbjewelz | last post by:
Hey all. So I'm having problems with cross browser alignments. I'm looking at Safari and Mozilla Firefox. I develop in Safari and so it looks perfect there however in Firefox my vertical alignments and div widths are off. It's as if firefox has a different definition of a pixel than safari. Here is the url: http://theprize.chemouni.com/testing.php. When you select the Option from the pull down, the first part of the form appears. Then when...
29
2307
by: töff 93722 | last post by:
Long story short, I built a website based primarily on JavaScript: http://www.sjcga.com The site renders *great* in WinIE6/7 and in Mac/Win Opera9. It has problems in Mac/Win Firefox2, and in Safari(OSX) ... especially the Gallery, but the rightside menu is funky also. I've "validated" my scripts through a couple different systems, to no
5
3756
by: johnric | last post by:
I can't seem to get firefox to read the image size in my javascript. It will work in IE and firefox but firefox will not read the image size. Can anyone see the problem in my code? I am new to programming and not very good at it yet.: <HTML> <HEAD> <script language="JavaScript"> //-- Generate a random number between 0 and max. function randomNum(max) { var rNum=NaN while (isNaN(rNum)) { rNum=Math.floor(Math.random()*(max))
10
1840
by: jodleren | last post by:
Hi I know, that there are a lot of people having problems with orkut.com, errors like "object expected" and named objects missing. When loading the site can generate some 10 errors, and still just leave a blue page - seems like it heavily rely on JS. Still, me and friends having problems and orkut seems just to ignore it. I am sure, that other poeple have problems, and I really wonder what
0
8677
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8620
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8474
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5563
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4079
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2605
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1784
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.