My jscript is not running in IE

hello

although my javascript runs in firefox, doesn’t in IE.

could you tell me why ?

<script type=“text/javascript”>
var xoffset = 0;
var yoffset = 0;

var width;
height;

var xx;
var yy;

function first() {

	// Burada bir alert 'Burday&#305;m gibi'

	if (document.getElementById) {
		img = document.getElementById('harita:imgMap');
		if (img.style) {

			xoffset = img.style.left;
			yoffset = img.style.top;

			return;

		} else {
			alert('hata first: img.style');
		}

	} else {
		alert('hata first first:document.getElementById');
	}

	if (document.all) {
		imgall = document.all['harita:imgMap'];
		if (imgall.style) {

			xoffset = imgall.style.left;
			yoffset = imgall.style.top;
			return;

		} else {
			alert('hata first: imgall.style');
		}

	}
	// return ???
}

function startRubber(evt) {

	// Burada bir alert 'Burday&#305;m gibi'

	first();

	var myReference = null;
	if (document.getElementById) { // buras&#305; firefox a uyar Ya explorer
		myReference = document.getElementById('harita:rubberBand');

	} else {
		alert('hata startRubber:document.getElementById');
	}
	if (myReference.style) {
		//DOM & proprietary DOM
		myReference.style.width = 0;
		myReference.style.height = 0;
		myReference.style.left = (evt.clientX) + 'px';
		myReference.style.top = (evt.clientY) + 'px';

		myReference.style.visibility = 'visible';

		var xx = new Number(evt.clientX - parseInt(xoffset));
		var yy = new Number(evt.clientY - parseInt(yoffset));

		xx = xx.toFixed(3);
		yy = yy.toFixed(3);

		upperleft_koord(xx, yy);

	} else {
		alert(' hata startRubber:myReference.style');
	}
	document.onmousemove = moveRubber;

	return;

}

function moveRubber(evt) {

	if (document.getElementById) { // buras&#305; firefox a uyar  // explorer ???
		myReference = document.getElementById('harita:rubberBand');
		myReference.style.width = (evt.clientX - parseInt(myReference.style.left)) + 'px';
		myReference.style.height = (evt.clientY - parseInt(myReference.style.top)) + 'px';

		width = parseInt(myReference.style.width);
		height = parseInt(myReference.style.height);

	} else {
		alert(' hata moveRubber document.getElementById');
	}

	myReference.onmouseup = stopRubber;

	return;
} //moveRubber

function stopRubber() {
	myReference.style.visibility = 'hidden';
	myReference = null;
	document.onmousemove = null;
	if (document.getElementById('harita:rect_zoom')) {
		document.getElementById('harita:rect_zoom').value = '0';
		document.getElementById('harita:zoom_rect').src = './images/zoom_rect.png';
		
	} else {
		alert('hata stopRubber() document.getElementById(harita:rect_zoom ');
	}

	width_height(width, height);
	return;
	//document.forms['harita'].submit();
} //stopRubber

//document.onmousedown = startRubber;
//document.onmouseup =   stopRubber;

function koord_click(event) {
	first();
	fm = 'harita';
	img = document.getElementById(fm + ':harita1');

	if (img) {
		xx = 0;
		yy = 0;
		xx = event.clientX - parseInt(xoffset);
		yy = event.clientY - parseInt(yoffset); // bu de&#287;erler de&#287;i&#351;ebilir
		xx = xx.toFixed(3);
		yy = yy.toFixed(3);

		document.getElementById(fm + ':img_clicked').value = '1';

		img_clickxy(xx, yy);

		if (document.getElementById('harita:info_in').value == '1') {
			document.getElementById('harita:info_in').value == '0'
			javascript: Richfaces.showModalPanel('harita:infomodalPanel');
		}

		return;

	} else {
		alert(' img tan&#305;ms&#305;z' + img);
	}

} //koord_click

function zoom_rect() {

	if (document.getElementById) {

		document.getElementById('harita:zoom_rect').src = './images/zoom_rect_gray.png';

		if (document.getElementById('harita:rect_zoom').value == '0') {
			document.getElementById('harita:rect_zoom').value = '1';
			document.getElementById('harita:info_in').value = '0';
			document.getElementById('harita:infobutton').src = './images/Info24.png';
		}
		return;
	} else {
		alert('hata   zoom_rect() document.getElementById tan&#305;ms&#305;z');
	}

	return;
}

</script>

A colon is not a valid character in an id. All ids must start with a letter and be alphanumeric

I can’t see where the event object is being assigned for Internet Explorer:

function startRubber(evt) {
  var evt = (evt) ? evt : window.event;

And similarly for the moveRubber(evt) and koord_click(event) functions.

thank you

Don’t we use that format in jsf-jsp page. And it runs in Firefox normally.

thank you

I will work on it as you have suggested.