F
Frances
I need to replace iframes acc. to what option user chooses in a sel
obj.. but figured have to load a blank iframe when pg loads so I can
replace it.. (iframe gets put in a pre-existing div..) this is
approach.. I'm having some problems and would appreciate some help..
thank you very much...
var selItem;
var ifrCurr;
var div = document.getElementById("divPricing");
// this var not being read inside functions..
// (even if I take out 'var' from declaration..)
function currIF() { // to load a blank iframe..
ifrCurr = document.createElement("iframe");
ifrCurr.src = 'iframes/blank.html';
//div.appendChild(ifrCurr); // ****** var not being read...
document.getElementById("divPricing").appendChild(ifrCurr);
// errror on this line
// is null or not an obj... (??)
// no problem w/this line in below function..
}
window.onload=currIF();
function pricing() { // load iframes dynamically..
selItem = document.getElementById("product").value;
var ifr = document.createElement("iframe");
ifr.src = 'iframes/' + selItem + '.html';
document.getElementById("divPricing").appendChild(ifr);
// works fine here....
// div.appendChild(ifr); // ******* var not being read...
// document.getElementById("divPricing").replaceChild(ifr,ifrCurr);
// can't use this line yet b/c problems w/function above....
}
thank you very much........ Frances
obj.. but figured have to load a blank iframe when pg loads so I can
replace it.. (iframe gets put in a pre-existing div..) this is
approach.. I'm having some problems and would appreciate some help..
thank you very much...
var selItem;
var ifrCurr;
var div = document.getElementById("divPricing");
// this var not being read inside functions..
// (even if I take out 'var' from declaration..)
function currIF() { // to load a blank iframe..
ifrCurr = document.createElement("iframe");
ifrCurr.src = 'iframes/blank.html';
//div.appendChild(ifrCurr); // ****** var not being read...
document.getElementById("divPricing").appendChild(ifrCurr);
// errror on this line
// is null or not an obj... (??)
// no problem w/this line in below function..
}
window.onload=currIF();
function pricing() { // load iframes dynamically..
selItem = document.getElementById("product").value;
var ifr = document.createElement("iframe");
ifr.src = 'iframes/' + selItem + '.html';
document.getElementById("divPricing").appendChild(ifr);
// works fine here....
// div.appendChild(ifr); // ******* var not being read...
// document.getElementById("divPricing").replaceChild(ifr,ifrCurr);
// can't use this line yet b/c problems w/function above....
}
thank you very much........ Frances