B
BananaQuaalude
I'm getting the following error when I try to dynamically create an
iframe:
Error: Expected hexadecimal digit
This only occurs when I try to give the iframe a src value. If I leave
out the src, no error. Any ideas?
Here is the code:
var d=document;
if(d.getElementById && d.createElement && d.body &&
d.body.appendChild && typeof d.body.innerHTML != "undefined") {
var
Block = d.getElementById("childrenBlock"),
index = getLineItemCount();
//alert(index)
var container = d.createElement("div");
container.innerHTML =
"<div id='FileUpload" + index + "' class=Text><iframe frameborder=0
width=100% height=30% " +
"scrolling=no border=0 id='demo' name='demo' src='NewUpload
\upload2\demo.asp'></iframe></div>" +
Block.appendChild(container);
There's quite a bit of code (other form elements) before and after the
iframe I'm trying to create, but if I comment out the iframe, or just
don't give it a src value, I get no errors.
Is this just a simple formatting issue?
Thanks!
iframe:
Error: Expected hexadecimal digit
This only occurs when I try to give the iframe a src value. If I leave
out the src, no error. Any ideas?
Here is the code:
var d=document;
if(d.getElementById && d.createElement && d.body &&
d.body.appendChild && typeof d.body.innerHTML != "undefined") {
var
Block = d.getElementById("childrenBlock"),
index = getLineItemCount();
//alert(index)
var container = d.createElement("div");
container.innerHTML =
"<div id='FileUpload" + index + "' class=Text><iframe frameborder=0
width=100% height=30% " +
"scrolling=no border=0 id='demo' name='demo' src='NewUpload
\upload2\demo.asp'></iframe></div>" +
Block.appendChild(container);
There's quite a bit of code (other form elements) before and after the
iframe I'm trying to create, but if I comment out the iframe, or just
don't give it a src value, I get no errors.
Is this just a simple formatting issue?
Thanks!