Discuss general web development related issues. For Opera bugs, use the Bug Report Wizard: https://bugs.opera.com/wizard/. For Opera feature requests and queries, use Desktop wish-list: http://my.opera.com/community/forums/forum.dml?id=24.
By xmarvelous
Friday, 5. September 2008, 09:04:06

<element>.style.display = none; shows no effect on opera 4 mac
hi!
i wrote an opera widget lately. for switching between different views i'm using <element>.style.display = none/block; with some div-layers. on windows machines that works seamless but on macs its a bit problematic. the strange thing is that sometimes it works and sometimes it doesn't hide the the background layer and just overlays the new layer over the other. i think that is very strange since the layers are not absolute positioned and should be among each other if the display command would fail. could this be a bug in the browser? feels like some kind of race condition.
i recognised the same issue on linux machines too.
one more thing to mention is that the layers are using the opacity style option. they are slightly transparent.
regards, marv
By nguunguyen
Sunday, 19. October 2008, 10:21:49

That is too in opera mobile 9.5 beta
By RainerHillebrand
Friday, 27. March 2009, 08:58:44

This feature does not work on Opera Mobile 8.65 and on Opera Mobile 9.51 Beta (Build 2723) on Windows Mobile 6 Professional as well. In order to easily check this wrong behaviour you could use the following code:
<!DOCTYPE html>
<html>
<head>
<title>Test style.display</title>
<script type="text/javascript">
function handleDockedMode()
{
document.getElementById("widget").style.display = "none";
document.getElementById("docked").style.display = "block";
}
</script>
</head>
<body onload="javascript:handleDockedMode();">
<div id="container">
<div id="widget">This text should be hidden.</div>
<div id="docked">This text should be visible.</div>
</div>
</body>
</html>
The same code is online at:
http://webcab.de/test/test.style.display.html
By vector090
Thursday, 9. July 2009, 02:32:14

well, I tried <div style='display:none'> and it does not work either, but later I wrote a separate css segment to define its class, and it works! sample code below:
<style type='text/css' media='handheld'>
.detail { display:none; }
</style>
<script type='text/javascript'>
function display(id)
{
document.getElementById(id).style.display="block";
}
</script>
title
Detail<span id='zz' class='detail'>content here content here</span>