I have the code
new_element.innerHTML ="<a href='#'><img src='"+imagePath+"' alt='' title='' width='466' onclick='addWidget('"+url+"');' height='165'></a>";
which will call the function addWidget:
function addWidget(url) {
alert(url);
var main= document.getElementById('mainwidget');
main.innerHTML = "<iframe src='"+url+"' align='left' height='1060px' width='576px' scrolling='no' frameborder='0' id='lodex'></iframe>";
}
but it's not working. Any suggestions?