abch624 Posted April 14, 2009 Share Posted April 14, 2009 Hi There, I have created a function on my site that should display and hide text. This works perfectly fine in all the browsers except Firefox!! FireBug tells me that the Div I am trying to display is not defined and it has been defined so weird!! My website is www.zahidchaudhry.com. The link I am talking about is in the bottom called Show Text (i have added an image) Please help with this. Cheers - Zahid [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/154020-solved-firefox-problem-with-minimize-div/ Share on other sites More sharing options...
Adam Posted April 14, 2009 Share Posted April 14, 2009 Try changing the function to: <script type="text/javascript"> function Display(num) { var text1 = document.getElementById('text1'); var text2 = document.getElementById('text2'); if (num == 1) { text1.style.display = "block"; text2.style.display = "none"; } else if (num == 2) { text1.style.display = "none"; text2.style.display = "block"; } } </script> Adam! Link to comment https://forums.phpfreaks.com/topic/154020-solved-firefox-problem-with-minimize-div/#findComment-809725 Share on other sites More sharing options...
abch624 Posted April 14, 2009 Author Share Posted April 14, 2009 Well spotted I fixed the problem. Thanks a lot for you help much appriciated. Cheers Link to comment https://forums.phpfreaks.com/topic/154020-solved-firefox-problem-with-minimize-div/#findComment-809730 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.