Hi.
I am trying to develop a small webshop for some friends, and I tought it was working very well until I accidentally tested it in IE (works fine in Chrome and Firefox).

When someone clicks the "add to basket" there is an On-Click that triggers a function. That function sends the session ID and the product ID to a seperate file (.asp) that adds the values to a temporary table. Then the the function is supposed to fetch and summarize the basket content and update it in the browser. This works fine everywhere except in IE.

Any ideas?

Here is some of the code:

<a href="#" onClick="AddToBasket(5,897)">Legg til i handlekurv</a>
function AddToBasket(TmpVid,TmpLoggID) {
	$.ajax({
		type:"POST",
		url: "/common/post_AddToBasket.asp",
		dataType: "application/x-www-form-urlencoded",
		data: "vid="+ TmpVid + "&sid=" + TmpLoggID,
		async: true
	})
		setTimeout("$('#prebasket').load('/common/ajax_prebasket.asp?sid=' + 897 + '&lang=no');", 350);
};
</script>

Here is the link to where you can test it: http://hbs-product.com/no/?m=p&i=5

(just don't go all the way to check-out to avoid ordering something)
The "Add to Basket" is the gray box with the norwegian text "Legg til i...", the basket is on the right sidebar.

I'm not really any good with java, but at least I got it working in some browsers.

Thanks in advance :)

By the way, the first part of the function seems to work, but updating the content fails.

Solved it! Something to do with cacheing...

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.