SgtLegend and anbody else interested! The title for the original post (iObj syntax error) was wrong from the getgo. There was no fault with the iObj javascript function addtocart(). I proved this by seting a timeout on the function in 'checout.js' that allowed me to run the script 10 seconds after the index.html was loaded. I then changed the innerHTML of div id f1 with Ajax call from 'index.js' and the functions in 'checout.js' ran. I decided I would call the functions from 'checout.js' with the Ajax call from 'index.js'. This can only be approached by creating a function in 'index.js' that creates a script tag and appends the script tag to document body [0]. That function would be added to the function in 'index.js' that calls the Ajax call in the same external.js. I proved that the script tag was added to the index.html by changing the onclick of an available button to alert the outerHTML of document getelementsbytagname script [2] which when clicked after the Ajax call was made and the responceText altered the innerHTML of f1 correctly, alerted the new script tags outerHTML as I had created it. The problem is that it doesn't run the script on the new objects in f1. This I don't understand. I had removed the echo script tag 'checout.js' from the php file that was used by the Ajax call as it to did not work. Would that it would but it doesn't. Any ideas why? Would be greatfully accepted!