I want to do something when 2 document.write() statements have successfully occured. I tried the following but it didn't work:
function loadFields() {
var load1 = document.write("<input type='text' name='StoreLocation' value='"+storeLocation+"' />");
var load2 = document.write("<input type='text' name='couponType' value='"+couponType+"' />");
}
if (loadFields()) {
alert('both items have loaded.');
}
I also tried this and again same result:
var load1 = document.write("<input type='text' name='StoreLocation' value='"+storeLocation+"' />");
var load2 = document.write("<input type='text' name='couponType' value='"+couponType+"' />");
if (load1 && load2) {
alert('both items have loaded.');
}