473,508 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

script works in IE6 but not in FF3

Tarantulus
114 New Member
Hi All,

I have the following script in the head of my document

Expand|Select|Wrap|Line Numbers
  1. var state = false; function edit() {     document.getElementById('editor_area').style.display = state ? 'none' : 'inline';     document.getElementById('display_area').style.display = state ? 'inline' : 'none';     state = !state;     if (!state) document.getElementById('jump').focus(); }  
in the body the edit() function is called onclick.

it works in IE, but in FF it fails, and the error console displays "edit not defined"

can anyone explain why this is?

Thanks in advance
Jul 11 '08 #1
3 1122
acoder
16,027 Recognized Expert Moderator MVP
Can you show the HTML code? Are you sure you've set the IDs of the elements?
Jul 11 '08 #2
Tarantulus
114 New Member
I'm sure the ID's are set, the error is referring to the function name not an element ID...
Jul 11 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
I can't see anything obvious (though I'm not sure why you're putting everything on one line), so the HTML code or how you're calling the function might help. It would be even better if you could put together a test page that demonstrates the problem.
Jul 11 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

8
3308
by: Sticks | last post by:
ok... im not quite sure how to describe my problem. i have a php script that runs through my entire php site and writes the resulting output to html files. this is necessary as the nature of the...
12
9668
by: bhennon | last post by:
Hey all, I have a small php script that calls a random image at the following page. http://www.2006ymcanationals.com/random.php IT WORKS IF I go directly to the above link. I am trying to...
5
2612
by: Tim Morrison | last post by:
Is there any easy way to create a change script as illustrated below for all tables within a database? Right now I would have to create a seperate script for each table. I would like to be able...
5
2516
by: Yves-Alain NICOLLET | last post by:
How is it that when I include a script within a document it works and when I try to get it from my webserver it does not seem to work at all? I have documents on my webserver that contain a...
5
1639
by: zaw | last post by:
Hi I am working on implementing this script to shopping cart. Basically, it copies fill the shipping address from billing automatically. I believe one or more syntax is not netscape compatible....
23
16102
by: Loony | last post by:
I have got a code like this in HTML section in ASP file which includes javascript file! The script works under MS IE but doesn't with Firefox! Can anybody tell me what is wrong? <HTML>...
9
2194
by: Jerim79 | last post by:
I am no PHP programmer. At my current job I made it known that I was no PHP programmer during the interview. Still they have given me a script to write with the understanding that it will take me a...
8
1652
by: Milsnips | last post by:
hi there, i'm currently using the following line: <script language="javascript" type="text/javascript" src="../scripts/timer.js"></script> but i want to do the following, as the script...
9
20877
by: 8anos | last post by:
Hello, I am new at the community and newbie at programming :) As you may know rapidshare provides a perl script for linux, to upload files at their servers. You can find the original scripts at...
1
1692
by: rfr | last post by:
Apparently the Transitional Doctype kills this script because the script does not make proper use of units like "px". It works well without a doctype statement. But once someone adds a...
0
7225
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
7046
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...
0
7498
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...
0
5629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4707
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...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.