473,387 Members | 1,528 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

cgi / javascrip / perl / innerHTML quoting confusion

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').inne rHTML
=
'<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?

Jun 20 '06 #1
2 1800
seven.reeds said the following on 6/20/2006 3:45 PM:
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.


Your script error aside, you won't be able to do what you are trying to
do anymore. It has been decided that showing an image from the client
file system on a web-based page is a security violation so you can't do it.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jun 20 '06 #2
> Your script error aside, you won't be able to do what you are trying to
do anymore. It has been decided that showing an image from the client
file system on a web-based page is a security violation so you can't do it.


Thanks Rand,

it figures. sigh

all the best

Jun 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

42
by: Fred Ma | last post by:
Hello, This is not a troll posting, and I've refrained from asking because I've seen similar threads get all nitter-nattery. But I really want to make a decision on how best to invest my time....
6
by: von | last post by:
Is it possible to run a Perl script from within a javascript? I have an existing javascript that provides some data - and I want to write that data to a text file on my server via a Perl script...
24
by: bedhead | last post by:
Why doesn't a SELECT element's innerHTML reflected which option was selected? Works in IE. I need this functionality so that I can retain what choices a user made in a tabbed interface. ...
29
by: Mainlander | last post by:
An ISP I belong to uses Majordomo for their mailing list system. I'd like to encourage them to move to a system that uses a database, preferably psql which they already run on their server....
3
by: John Gibson | last post by:
Hi, all. I read that the "--with-perl" option "Build the PL/Perl server-side language". Does that mean the the switch is necessary to connect to the PostgreSQL database if you are using a perl...
4
by: jottevanger | last post by:
Is it me, or is innerHTML in IE7 (and as far as I can tell createNode and importNode) rewriting the HTML to upper case and removing most of the quotation marks? I am trying to copy XHTML into an...
3
by: SJ | last post by:
Hi, So I am trying to save off my source HTML to an xml document in order to cache a large view within my ajax app. For those of you familiar with this, the innerHTML does not preserve the...
22
by: Dan Rumney | last post by:
Hi all, I've been writing Javascript for quite a while now and have, of late, been writing quite a lot of AJAX and AJAX-related code. In the main, my dynamically generated pages are created...
6
by: PaPa | last post by:
I'm not sure this is a javascript issue or an HTML issue. I notice that when I extract the contents of a div using the innerHTML property (?), that I wind up with a literal variable (?) which...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.