943,813 Members | Top Members by Rank

Ad:
Sep 13th, 2008
0

Passing variable Explorer vs Firefox

Expand Post »
Hello,

When I pass variables 'contentA','contentB','contentC', etc... into the tabs() function, it does not work in Internet Explorer.
When I pass variables contentA,contentB,contentC, etc... into the tabs() function, it works perfectly in Internet Explorer but not in firefox!!!!

This is the last bug that I need to fix in my site - and it'll be ready (after having beed doing it for 2 months). I think this is the last web site I'm building manually - too much stress and time consuming. I'll do all my web sites from now on in Dreamweaver, with just minimal coding. I think there are more practical things in daily life and career planning to think about, than getting stuck in some javascript bugs, etc, for days, don't you think so? Although I love creating web pages. And I admire the guys who make their living on programming in php, javascript, etc.

Can anybody help me with this?
Thanks.



JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <script language="JavaScript" type="text/JavaScript">
  2. <!--
  3.  
  4. function tabs(view,hideA,hideB,hideC,hideD,colourid1, colourid2, colourid3, colourid4, colourid5) {
  5.  
  6. if (view.style.visibility == "hidden") {
  7. view.style.visibility = "visible";
  8. view.style.display = "block";
  9. hideA.style.visibility = "hidden";
  10. hideB.style.visibility = "hidden";
  11. hideC.style.visibility = "hidden";
  12. hideD.style.visibility = "hidden";
  13. hideA.style.display = "none";
  14. hideB.style.display = "none";
  15. hideC.style.display = "none";
  16. hideD.style.display = "none";
  17. }else{
  18. view.style.visibility = "hidden";
  19. view.style.display = "none";
  20.  
  21.  
  22. }
  23. }
  24.  
  25.  
  26. //-->
  27. </script>
  28. </head>
  29.  
  30. <body>
  31.  
  32. <ul>
  33. <li><a href="javascript:void(0);" onClick="tabs('contentA','contentB','contentC','contentD','contentE','originalcolourA')" id="originalcolourA"><b>Colour</b></a></li>
  34. <li><a href="javascript:void(0);" onClick="tabs('contentB','contentA','contentC','contentD','contentE','originalcolourB','originalcolourA','originalcolourC','originalcolourD','originalcolourE')" id="originalcolourB"><b>Feeding</b></a></li>
  35. <li><a href="javascript:void(0);" onClick="tabs('contentC','contentA','contentB','contentD','contentE','originalcolourC','originalcolourA','originalcolourB','originalcolourD','originalcolourE')" id="originalcolourC"><b>Breeding</b></a></li>
  36. <li><a href="javascript:void(0);" onClick="tabs('contentD','contentA','contentB','contentC','contentE','originalcolourD','originalcolourA','originalcolourB','originalcolourC','originalcolourE')" id="originalcolourD"><b>Voice</b></a></li>
  37. <li><a href="javascript:void(0);" onClick="tabs('contentE','contentA','contentB','contentC','contentD','originalcolourE','originalcolourA','originalcolourB','originalcolourC','originalcolourD')" id="originalcolourE"><b>Location</b></a></li>
  38. </ul>
  39.  
  40. <div id="contents">
  41. <div id="contentA" style="visibility: hidden;"><p id="contentAA"></p></div>
  42. <div id="contentB" style="visibility: hidden;"><p id="contentBB"></p></div>
  43. <div id="contentC" style="visibility: hidden;"><p id="contentCC"></p></div>
  44. <div id="contentD" style="visibility: hidden;"><p id="contentDD"></p></div>
  45. <div id="contentE" style="visibility: hidden;"><p id="contentEE"></p></div>
  46. </div>
  47.  
  48.  
  49. </body>
Similar Threads
Reputation Points: 10
Solved Threads: 1
Light Poster
Mylena is offline Offline
30 posts
since Jul 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: How to scroll over big image on web
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: IE6 fires unexpectedly 'onclick' when pressing ENTER (keyCode 13)





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC