473,321 Members | 1,778 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

How to comply with all...I'm stuck!

Hi All,

I have a problem to solve.

I have a table whose rows can be either in edit or view mode. For that
I need to toggle the visibility and the display of both of them. I had
all of this working in MSIE 5.5...but I thought it would be a lot
better if I could make it work in Opera. And I made it work...it took
some code refining, adjusting firmly to w3 standards but...I end up
with a solution that was working in Opera 7 but not working in IE 5.5.
And from what I have seen in forums, the solotion for Opera 7 its not
supported by MSIE...

This is a mockup of my code in Opera:
<table>
<tr style="visibility: visible; display: table-row">
<td> Some data</td>
</tr>
</table>

whereas in MSIE I would use display: inline...

I inmediately thought of browser sniffing...but that means keeping two
sets of code for the javascript file ...and then I have to take care
too of the embedded styles in the html pages. This puts me off a bit.
I would also like to achieve the ideal of one code works for both...

I have been playing with the idea of not using a table and using divs
instead of rows...but I would like to keep it in that way...
Has anyone got any idea of how can I do it keep the rows, and make it
work both in Opera and MSIE? That would be very useful? Has anyone
solved this problem before?

Thanks in advance for your help!

Belen
Jul 20 '05 #1
1 1616
In article <90**************************@posting.google.com >,
be***@netcom.no (belen) wrote:
I have a table whose rows can be either in edit or view mode. For that
I need to toggle the visibility and the display of both of them. I had
all of this working in MSIE 5.5...but I thought it would be a lot
better if I could make it work in Opera. And I made it work...it took
some code refining, adjusting firmly to w3 standards but...I end up
with a solution that was working in Opera 7 but not working in IE 5.5.
And from what I have seen in forums, the solotion for Opera 7 its not
supported by MSIE...

This is a mockup of my code in Opera:
<table>
<tr style="visibility: visible; display: table-row">
<td> Some data</td>
</tr>
</table>

whereas in MSIE I would use display: inline...
I advice to do something more simple:

<tr id="row" class="show">

..show { display: block; } /* or whatever CSS rocks your boat */

Then use document.getElementById("row").className="hide"; to change the
CLASS value of that row. This is using JavaScript to access the DOM
(Document Object Model). W3 recommendations material, so use and be part
of the bigger whole and have amazing stories to tell your friends. In
the CSS you have specified how that class is supposed to work out:

..hide { display: none; }

I inmediately thought of browser sniffing...but that means keeping two
sets of code for the javascript file ...and then I have to take care
too of the embedded styles in the html pages. This puts me off a bit.
I would also like to achieve the ideal of one code works for both...
If you want to look retro or just old, it is ok to use multiple versions
of documents, catered to quirks of "both browsers". :)

I have been playing with the idea of not using a table and using divs
instead of rows...but I would like to keep it in that way...
You should use whatever element is appropriate to the content. And also,
not make the page depend on the widget you are trying to make. Like, I
can do with reading a table of departure/arrival times; colors on the
rows would be nice. Just to illustrate this idea.
Has anyone got any idea of how can I do it keep the rows, and make it
work both in Opera and MSIE? That would be very useful? Has anyone
solved this problem before?


Opera 7 and up, yes. Opera 6 sucks at JavaScript. Another reason why the
page should not depend on it.

--
Kris
kr*******@xs4all.netherlands (nl)
"We called him Tortoise because he taught us" said the Mock Turtle.
Jul 20 '05 #2

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

Similar topics

1
by: No | last post by:
I purchased a program ( So I thought) that turned out to be just a bunch of php scripts put together. I am getting terrible support from the author but I am biting my tongue because I don't want...
1
by: ron | last post by:
have been stuck on this for several days now. I am trying to create a reverse polish calculator and I'm stuck at an intermediate stage. This is what I know I have to do (just not sure how to do it...
13
by: Ben Sharvy | last post by:
Is there a list of the changes you need to make to HTML 4.1 cose to make it dual compliant, with XHTML 1.1 also?
12
by: David Powell | last post by:
Because my work area won't have an Access programmer next year, I've been asked to rebuild their coded application as a set of modular tools. The idea is that a non-programmer will be able to...
8
by: MLH | last post by:
I use a mouse-down procedure to trap right mouse clicks and CTRL-Right mouse clicks. Running the procedure must put honey or some other sticky substance into my keyboard because subsequent...
4
by: Astronomically Confused | last post by:
using System; using System.Collections; using System.IO; using System.Net; using System.Net.Sockets; using System.Threading; class HttpProcessor { private Socket s;
1
by: DonWolfi | last post by:
I am trying to get of our the database of our finance system all records where the the first field is the same and that either comply with condition a or condition b. Example: /<font...
4
by: =?Utf-8?B?TWF1cg==?= | last post by:
My cd is stuck in the drive. I can open the drawer O K but the c d will not come out Help me please -- Maur
0
by: =?Utf-8?B?QmlsbEI=?= | last post by:
This is a tough one... My Windows Service app periodically performs some processing on new entries to a SQL Server database table. It uses a simple System.Timer to call the Elapsed event...
7
by: alphasahoo | last post by:
Hi I am working on a program which writes the output a SQL select statements from number of source tables first to a load matrix and then writes to a load.dat file. But while writing to the...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.