I don't understand why I can't get either of these methodes to work but for sure there are syntax errors in the script that are not being reported by 'Developer' tools in IE8.
Script not working
Code:
function getprompt(){
/*
f1.innerHTML=' ';
var f1prompt=document.createElement('div');
f1prompt.id='f1prompt';
var label=document.createElement('label');
label.setAttribute("for", "productreturn");
f1prompt.appendChild(label);
var productreturn=document.createElement('input');
productreturn.id='productreturn';
productreturn.value=products.slice(-1);
f1prompt.appendChild(productreturn);
var breturn=document.createElement('button');
breturn.id='breturn';
f1prompt.appendChild(breturn);
document.getElementById('f1').appendChild(f1prompt);//doesn't work?
*/

f1.innerHTML='<div id="f1prompt">\n'; //must be syntax error
f1.innerHTML+='<label for="productreturn">You must return to the product page:</label>\n';
f1.innerHTML+='<input id="productreturn" type="text" value="products.slice(-1)" />\n';
f1.innerHTML+='<button id="return">Return</button>\n';
f1.innerHTML+='</div>';

}

function viewcart(){
var items=cartbody.rows.length;
if(f1.className=='htmlpage'){
//prompt('You need to return to product page: ',products.slice(-1));//works
getprompt();//f1 returns blank?
//f1.innerHTML=getprompt(); tried & returned blank f1?
}
Spacing-out again! Any help greatly appreciated.