Jump to content

[SOLVED] Firefox problem with Minimize Div


abch624

Recommended Posts

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) :D

 

Please help with this.

 

Cheers - Zahid

 

[attachment deleted by admin]

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!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.