Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var displaySuccess = function(req){
- var imgArr = new Array;
- var xmlDoc = req.responseXML;
- var hasOpts = false;
- //Retrieve the btid value from the returned XML.
- var args = xmlDoc.getElementsByTagName('Argument');
- for(i=0; i < args.length; i++){
- var curArg = args[i];
- var attrName = curArg.getAttribute('Name');
- var attrValue = curArg.getAttribute('Value');
- if(attrName == "btid"){
- courseID = attrValue;
- } else if(attrName == "btops")
- hasOpts = true;
- }
- newDiv = Builder.node('div',{id: 'theTexts', style:'display:none;'});
- var items = xmlDoc.getElementsByTagName('Item');
- for(var i=0; i < items.length; i++) {
- var theItem = items[i];
- var theASIN = theItem.getElementsByTagName('ASIN').item(0).firstChild.nodeValue;
- imgArr[i] = theASIN;
- //Various other js code that isn't exactly relevant to this discussion.
- theOutput = Builder.node('p',{className: 'item'},[
- Builder.node('img',{src: imgURL, classname: 'item-img', id: theASIN, alt: title.firstChild.nodeValue}),
- Builder.node('em',title.firstChild.nodeValue),
- Builder.node('br'),
- byList,
- Builder.node('br'),
- Builder.node('br'),
- Builder.node('strike','List Price: '+listPrice+''),
- Builder.node('br'),
- Builder.node('strong','Amazon Price: '+ourPrice+''),
- Builder.node('br',{className: 'clearer'})]);
- //Append theOutput to the newDiv.
- newDiv.appendChild(theOutput);
- }
- $('texts'+courseID).appendChild(newDiv); //This is the line that throws the error in Safari.
- Effect.Appear('theTexts');
- for(i=0; i<imgArr.length; i++){
- new Draggable(imgArr[i],{revert:true});
- }
- }
Add Comment
Please, Sign In to add comment