the44chris
Programmer
We are having an odd problem only in internet explorer. An error exists on our product pages that is disabling the "add items to portfolio" feature. In firefox this problem does not exist. The error generated is:
Line: 42
Char: 5
Error: Object doesn’t support this property or method
Code: 0
URL: points to our order_page.pl with a reference to the specific product
I was hoping somebody could take a look over this small bit of javascript code and see if they can find anything that would cause this type of error.
Thanks in advance for any help.
Line: 42
Char: 5
Error: Object doesn’t support this property or method
Code: 0
URL: points to our order_page.pl with a reference to the specific product
I was hoping somebody could take a look over this small bit of javascript code and see if they can find anything that would cause this type of error.
Code:
[b]Add to favorites button on template:[/b]
<a href="#" id="addToFavorites" rel="<!-- #photo_id -->">
<img src="/images/add.gif" border="0">
[b]Referring JavaScript:[/b]
function initItemPage() {
window.addEvent('domready', function(e) {
printTable();
$('addToFavorites').addEvent('click', function(e) {
var ev = new Event(e);
ev.stop();
var photoID = ev.target.getParent().getProperty('rel');
var urlPrefix = "/cgi-bin/show_favorites.pl?";
var sizeSelect = null;
$ES('.sizeRadioSelect').each(function(el) {
if (el.getValue()) {
sizeSelect = el.getProperty('rel');
}
});
var urlParams = new Hash();
urlParams.set('action', 'add');
urlParams.set('photo_id', photoID);
urlParams.set('size', sizeSelect);
var queryString = Object.toQueryString(urlParams.obj);
var resultUrl = urlPrefix + queryString;
window.location = resultUrl;
});
});
}
Thanks in advance for any help.