473,770 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Firefox bug?

Hi,

to implement search by javascript function I use this code:

==============
function filterContacts( term, _id, cellNr){

var s = term.value.toLo werCase();
var table = document.getEle mentById(_id);
var ele;

for (var r = 0; r < table.rows.leng th; r++){
table.rows[r].style.display = 'none';
}
for (var r = 0; r < table.rows.leng th; r++){
ele = null;
if (table.rows[r] != null && table.rows[r].cells[cellNr] != null){
ele = table.rows[r].cells[cellNr].innerHTML;
if (ele.toLowerCas e().indexOf(s)< 0 ) {
table.rows[r].style.display = 'none';
} else {
table.rows[r].style.display = 'block';
}
}
}

}

===============

This works fine in IE,
but there are some bugs in Firefox.
There are a style.display bugs in firefox?

Thanks for any suggestion.
fabio

Apr 25 '07 #1
2 3480
"Fabio Maggi" <fa*****@tin.it wrote:
for (var r = 0; r < table.rows.leng th; r++){
ele = null;
if (table.rows[r] != null && table.rows[r].cells[cellNr] != null){
ele = table.rows[r].cells[cellNr].innerHTML;
if (ele.toLowerCas e().indexOf(s)< 0 ) {
table.rows[r].style.display = 'none';
} else {
table.rows[r].style.display = 'block';
}
}
}

}

============== =

This works fine in IE,
but there are some bugs in Firefox.
There are a style.display bugs in firefox?
There probably are, but the bug here is in your code not Firefox.

don't try to set table rows to 'block' display style (except in the
Microsoft universe table rows have a 'table-row' display style): just clear
the display style to make it visible on all browsers:
} else {
table.rows[r].style.display = '';
}
Apr 26 '07 #2
Fabio Maggi a écrit :
Hi,

to implement search by javascript function I use this code:

==============
function filterContacts( term, _id, cellNr){

var s = term.value.toLo werCase();
What is term? A reference to an input or the name attribute of an input?
Firefox and IE6+ do not work the same way on referencing form input
controls.

Visit section 3.2 of this page:
Using Web Standards in your Web Pages
3.2 Accessing Elements with the W3C DOM
http://developer.mozilla.org/en/docs...your_Web_Pages
var table = document.getEle mentById(_id);
var ele;

for (var r = 0; r < table.rows.leng th; r++){
table.rows[r].style.display = 'none';
}
for (var r = 0; r < table.rows.leng th; r++){
ele = null;
if (table.rows[r] != null && table.rows[r].cells[cellNr] != null){
ele = table.rows[r].cells[cellNr].innerHTML;
if (ele.toLowerCas e().indexOf(s)< 0 ) {
table.rows[r].style.display = 'none';
} else {
table.rows[r].style.display = 'block';

For CSS 2.1 compliant browsers, the default display value of row element
is table-row. MSIE 6 and MSIE 7 do not support display: table-row. So
IE6+ has bugs, CSS 2.x bugs.
Also, MSIE 6 and MSIE 7 do not support visibility: collapse for table
rows and table columns; so again, MSIE 6+ has the bugs. Firefox 2
supports visibility: collapse for table rows.

Gérard
--
Using Web Standards in your Web Pages (Updated Dec. 2006)
http://developer.mozilla.org/en/docs...your_Web_Pages
Apr 26 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
9292
by: Jeremy Epstein | last post by:
I've got a 4-page form that lets users enter a whole lot of information, which is then submitted and emailed at the end. All the fields are stored as session data. The whole thing works fine: 1. On my local box (WinXP / Apache2 / PHP4) using IE6 2. On my local box using Firefox1 3. On my hosted server (RHLinux / Apache1.3 / PHP4) using IE6
87
9628
by: expertware | last post by:
Dear friends, My name is Pamela, I know little about CSS, but I would like to ask a question I have an image on a web page within a css layer: <DIV ID=MyLayer STYLE = "position: absolute;top:68px; left:563px; width:640px;height:480px;"> <IMG src="ReportImageBox_12.54.52.png" width=640 height=480></IMG>
14
2327
by: expertware | last post by:
Ok! to avoid confusion I will start a new argument. Thanks!! FIREFOX 1.0.7 AND IE6 viewed through DATATIME: a summary REPORT =============================================================== by Pamela Datatime Team -----------------
5
3119
by: SPE - Stani's Python Editor | last post by:
Hi, During optimizing SPE for Ubuntu, I found something strange. I have Ubuntu 5.10 "The Breezy Badger" and unfortunately this code is not working: >>> import webbrowser >>> webbrowser.open("http://www.python.org") It does not throw an exception, but is not able to launch a browser.
7
9616
by: Coder | last post by:
Hi I have the following code in java script, it is not giving proper output in FIREFOX but running fine in IE... can anybody help me out to make this run in FIREFOX . <script language="JavaScript"> var cntlName; var eleTarget = document.getElementById('hiding'); function showOrHide(){
12
1776
by: amit | last post by:
Hello group, I'm kinda skeptical about a code is being used in my js program. All it does is checking what browser is being run and finds out if FLASH is installed or not. This code works just fine withe IE but as far as Firefox I'm not sure. Using the firefox I can see flash pages easily but when this code says firefox is not installed in my firefox!!!
6
5833
by: scotty | last post by:
I have a script that loops through an existing table list and prepares each href element node to trigger a function when an image is clicked. The function that will be run passes a property value to the function upon clicking. The property value is one of the attributes defined for each respective href in the property list. In IE and Netscape, the property values pass correctly, but in Firefox, only the last property value in the list...
7
2538
by: Carlos Mendonça | last post by:
Has anyone managed to get ClickOnce to work with Firefox? It seems to me that it still has the same issues VS 2K5 had. I appreciate any comments or tips.
3
2433
by: SAL | last post by:
Hello, I did google this issue and found some stuff related to BrowserCaps section of either web.config or machine.config but it didn't work. It seems that most pages in my webapp are okay but a couple of the Firefox is munging up. So, on my information page there is a gridview in the content section of the page. The masterpage contains searching capabilities for the gridview. The masterpage has controls contained in a panel control,...
0
9619
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10260
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...
1
10038
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
9910
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
8933
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7460
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4007
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
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.