Hello,

I have this script for an ajax slideshow.
I made the functions and they are working perfect in Firefox, but in IE they are not working?

could the error be when I call the functions, or might it be the functions themselves

here are the functions

function isIE()
	{
		var browser = navigator.appName;

		if(browser == "Microsoft Internet Explorer") 
			return true;
			
		return false;		
	}
function MakeObject() {
	var xmlhttp=false; 
        try {
                xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); 
        } catch (e) {
                try {
                        xmlhttp = new
                        ActiveXObject('Microsoft.XMLHTTP'); 
            } catch (E) {
                xmlhttp = false;
                        }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest(); 
        }
		return xmlhttp;
}
	

function aj_next()
{
	
	var request=MakeObject();
	list = document.getElementById('id');
	list2 = document.getElementById('nr');
	list3 = document.getElementById('image');
	count2 = document.getElementById('count2');
			id = list.value;
			nr = list2.value;
			id_im = list3.value;
			count = count2.value;
			
			request.open('get', 'Template/js_slide.php?id_list='+id+'&nr='+nr+'&id_image='+id_im+'&mode=next');	
			request.onreadystatechange = function () {
			if(request.readyState == 4)
			{ 		
				var raspuns = request.responseText;	
				//alert(raspuns);
				var c = document.getElementById('content');
				if(nr!=count)
				{
				if(isIE() || (navigator.appName.indexOf("Opera") + 1))
				{
				var r='vari';
				c.outerHTML = '<table width="80%" align="center" cellpadding="0" cellpadding="0" height="350px" id="content"><>'+raspuns+'</table>';
				}
				else 
				{
					c.innerHTML = raspuns;
				}
				}		
			} 
		}
	request.send(false);
					
}

and here is the part where I call the function:

<img style="cursor: hand;cursor:pointer;" src='images/slide_right_inactive.jpg' onclick="aj_next();">

Thanks in advance

Recommended Answers

All 3 Replies

What errors are you getting in IE?

I don't think you can use HTML tags in Javascript code with IE

well I resolved the problem, I tried to take a value of some "hidden input items" and I forgot to open <form> tags, in firefox it wasn't case sensitive, but in IE it made problems.

regards.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.