Click to See Complete Forum and Search --> : Irregular behaviour of a DHTML-pattern


ppakuti
07-15-2003, 03:59 AM
Dear Ladies and Gentlemen,

I'm using the following code to make a certain block within a html-file visible, respectively unvisible. A hit on the link (href=#) switches between that two states.

<div id=showProzesseJAP style="display: ;">

...
<a href="#" class="text10" onclick="document.all.showProzesseJAP.style.display='none';document.all.noProzesseJAP.style.display='';"><img src="/syska/images/headline_pfeil_unten.gif" border="0"></a>

...

</div>

<div id=noProzesseJAP style="display: ;">

...
<a href="#" class="text10" onclick="document.all.showProzesseJAP.style.display='';document.all.noProzesseJAP.style.display='none';"><img src="/syska/images/headline_pfeil_links.gif" border="0"></a>

...

</div>

In the most cases this pattern works. But in a few cases, it dosn't. I can't find the reason for that, as I run identic versions of MS Internet Explorer allover my test-PCs.

Has somebody got an supposition why this pattern doesn't work sometimes?

Thank you in advance.

With best regards,
Paul

gil davis
07-15-2003, 04:51 AM
<div id=noProzesseJAP style="display: ;">Is this a typo?

It is very hard to trouble shoot a problem without having access to the entire page in a live situation. Please post a link.

Exuro
07-15-2003, 10:21 AM
You may try using document.getElementById() instead of document.all. This method seems to be more cross-browser compatable, but if you're using IE on all your computers, that wouldn't really be the problem would it? You may want to try it anyway though, since the problem itself doesn't make sense either...