S
seven.reeds
Hi,
I am not a js expert by any stretch and this might be a perl question
more than js but I have to start somewhere so fingers crossed...
Ok, I am doing some ajax and have this '<input type='file"' input that
I am working on. It is accepting image files. When its value changes
I want to display the image in an associated DIV. I am building the
html and js lines in a perl script. THe relevant section looks like:
$HTML .= <<EOF;
<p><label for="IThumbnail">Path to Thumbnail</label>
<input type="file" name="IThumbnail" id="IThumbnail"
size=50
accept="image/gif,image/jpeg"
onchange="
document.getElementById('IThumbnailImageDiv').innerHTML
=
'<img src="file://' +
document.getElementById('IThumbnail').value +
'" alt="upload file" />'; return false; " /></p>
<div id="IThumbnailImageDiv"
style="float:left;
clear:both;">
</div>
EOF
I'm testing this with FireFox and have the js Console open. It tells
me that there are mis-matching quotes starting at: '<img
I have tried quoting the double qyotes inside the IMG tag I am building
with "\" and "\\" but neither works. This has to be a simple mistake
but I am not seeing it.
help?
I am not a js expert by any stretch and this might be a perl question
more than js but I have to start somewhere so fingers crossed...
Ok, I am doing some ajax and have this '<input type='file"' input that
I am working on. It is accepting image files. When its value changes
I want to display the image in an associated DIV. I am building the
html and js lines in a perl script. THe relevant section looks like:
$HTML .= <<EOF;
<p><label for="IThumbnail">Path to Thumbnail</label>
<input type="file" name="IThumbnail" id="IThumbnail"
size=50
accept="image/gif,image/jpeg"
onchange="
document.getElementById('IThumbnailImageDiv').innerHTML
=
'<img src="file://' +
document.getElementById('IThumbnail').value +
'" alt="upload file" />'; return false; " /></p>
<div id="IThumbnailImageDiv"
style="float:left;
clear:both;">
</div>
EOF
I'm testing this with FireFox and have the js Console open. It tells
me that there are mis-matching quotes starting at: '<img
I have tried quoting the double qyotes inside the IMG tag I am building
with "\" and "\\" but neither works. This has to be a simple mistake
but I am not seeing it.
help?