Posted By

fugue on 12/29/06


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

vali29


Show/hide layers


 / Published in: JavaScript
 

  1. <script language="JavaScript" type="text/JavaScript">
  2.  
  3. function showprice() {
  4. if (document.getElementById) { // DOM3=IE5,NS6
  5. document.getElementById('pricerow1').style.visibility = 'visible';
  6. document.getElementById('pricerow2').style.visibility = 'visible';
  7. } else {
  8. if (document.layers) { // Netscape4
  9. document.pricerow1.visibility = 'visible';
  10. document.pricerow2.visibility = 'visible';
  11. } else { // IE4
  12. document.all.pricerow1.style.visibility = 'visible';
  13. document.all.pricerow2.style.visibility = 'visible';
  14. }
  15. }
  16. }
  17.  
  18. function hideprice() {
  19. if (document.getElementById) { // DOM3=IE5,NS6
  20. document.getElementById('pricerow1').style.visibility = 'hidden';
  21. document.getElementById('pricerow2').style.visibility = 'hidden';
  22. } else {
  23. if (document.layers) { // Netscape4
  24. document.pricerow1.visibility = 'hidden';
  25. document.pricerow2.visibility = 'hidden';
  26. } else { // IE4
  27. document.all.pricerow1.style.visibility = 'hidden';
  28. document.all.pricerow2.style.visibility = 'hidden';
  29. }
  30. }
  31. }
  32.  
  33. </script>

Report this snippet  

You need to login to post a comment.