Jump to content

[SOLVED] Script dont work in IE


web_master

Recommended Posts

Hi,

 

Im apsolutely novice in JavaScript so I need a help,

 

I got a script for change picture and text on onmouseover.

 

The script works perfectly in Mozilla, Chrome... but in IE not - cant see nothing ( Take a look at site www.miroslavjovancic.com )

 

the script is:

 

<script type="text/javascript"><!-- TenPictures
var winonload = window.onload;
var CurrentText;
window.onload = function(){
	if(winonload) winonload();
		CurrentText = document.getElementById('Text1');
	}
function SwapText(text_id) {
	CurrentText.style.display='none';
	o=document.getElementById(text_id);
	CurrentText=o;
	o.style.display='block';
}
// TenPictures --!>
</script>

 

Can help me someone, how can I change this script?

Link to comment
https://forums.phpfreaks.com/topic/145658-solved-script-dont-work-in-ie/
Share on other sites

ooh... in meantime I find the problem....

 

<script type="text/javascript"><!-- TenPictures

  var winonload = window.onload;

  var CurrentText;

  window.onload = function(){

      if(winonload) winonload();

        CurrentText = document.getElementById('Text1');

      }

  function SwapText(text_id) {

      CurrentText.style.display='none';

      o=document.getElementById(text_id);

      CurrentText=o;

      o.style.display='block';

  }

// TenPictures --!>

</script>

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.