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.getEle mentById("divPr icing");
// this var not being read inside functions..
// (even if I take out 'var' from declaration..)
function currIF() { // to load a blank iframe..
ifrCurr = document.create Element("iframe ");
ifrCurr.src = 'iframes/blank.html';
//div.appendChild (ifrCurr); // ****** var not being read...
document.getEle mentById("divPr icing").appendC hild(ifrCurr);
// errror on this line
// is null or not an obj... (??)
// no problem w/this line in below function..
}
window.onload=c urrIF();
function pricing() { // load iframes dynamically..
selItem = document.getEle mentById("produ ct").value;
var ifr = document.create Element("iframe ");
ifr.src = 'iframes/' + selItem + '.html';
document.getEle mentById("divPr icing").appendC hild(ifr);
// works fine here....
// div.appendChild (ifr); // ******* var not being read...
// document.getEle mentById("divPr icing").replace Child(ifr,ifrCu rr);
// can't use this line yet b/c problems w/function above....
}
thank you very much........ Frances