469,312 Members | 2,524 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,312 developers. It's quick & easy.

IMPUT TYPE=IMAGE / HELP PLEASE!

I have a content mgmt page that allows a user to update products in his
store - (actually a used car lot). All of the fields work perfectly - when
he puts content in.changes prices, etc it writes to the database and when
the page is refreshed the changes appear.

The problem is the image fields. They work OK if you put the correct HTML
tags in
i.e.-<img src="images/imagename.jpg"> I need a simpler way of doing this so
I tried to change the for the form fields from
<input size=28 name="image" value="<%= Server.HTMLEncode(image & "") %>"
maxlength=100

to
<input type="file" size=28 name="image" value="<%= Server.HTMLEncode(image &
"") %>" maxlength=100>

it sorta works and sorta doesn't - The whole location of the file I am
trying to insert i.e.-
C:\Documents and Settings\Administrator\My Documents\My Pictures\coby1c.jpg
gets put into the field

I need to find out how to have the script just put the image tag he wants
into the field

Any suggestions?
and thanx for any help

CobyfromBrooklyn
Jan 16 '06 #1
1 1753
You can't define programmatically the value for an input type=file field for
security reasons...

Depending on what you are trying to do you could just display the image and
use the form field only if the user want to update the current image...

--
Patrice

"Coby Herd" <ch***@nyc.rr.com> a écrit dans le message de
news:%2****************@TK2MSFTNGP12.phx.gbl...
I have a content mgmt page that allows a user to update products in his
store - (actually a used car lot). All of the fields work perfectly - when
he puts content in.changes prices, etc it writes to the database and when
the page is refreshed the changes appear.

The problem is the image fields. They work OK if you put the correct HTML
tags in
i.e.-<img src="images/imagename.jpg"> I need a simpler way of doing this so I tried to change the for the form fields from
<input size=28 name="image" value="<%= Server.HTMLEncode(image & "") %>"
maxlength=100

to
<input type="file" size=28 name="image" value="<%= Server.HTMLEncode(image & "") %>" maxlength=100>

it sorta works and sorta doesn't - The whole location of the file I am
trying to insert i.e.-
C:\Documents and Settings\Administrator\My Documents\My Pictures\coby1c.jpg gets put into the field

I need to find out how to have the script just put the image tag he wants
into the field

Any suggestions?
and thanx for any help

CobyfromBrooklyn

Jan 16 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Csaba Gabor | last post: by
1 post views Thread by Brian Genisio | last post: by
1 post views Thread by champ.supernova | last post: by
1 post views Thread by dwa | last post: by
3 posts views Thread by jackiepatti | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.