473,404 Members | 2,179 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,404 software developers and data experts.

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 1844
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Colin Steadman | last post by:
I have two buttons on my form and need to know which was clicked. If I setup the buttons like this: <input type="submit" value="submit" name="submit_to_array"> <input type="submit"...
4
by: Csaba2000 | last post by:
I want to be able to programatically click on the center of an <INPUT type=image ...> element (I only care about IE 5.5+). This should work regardless of whether IE has focus. Normally you would...
1
by: Wayne | last post by:
Please help... For some odd reason onclick is not working with and <input type="image"> but works fine on an <input type="button">.... This does not work: <input TYPE="image" src="go.gif"...
3
by: Csaba Gabor | last post by:
When I click on the image form element <INPUT type=image name=point src="map.png"> point.x and point.y values get submitted to the server specifying where on the image I have clicked. Is there...
2
by: Kimmo R. M. Hovi | last post by:
Currently I have defined: -- clip clip -- <form method="post" action="xx" enctype="application/x-www-form-urlencoded"> <input type="image" name="Function 1" src="image1.gif" border="0"...
1
by: Brian Genisio | last post by:
Hi all, I noticed that the image input type does not show up in the elements array (IE 6.0). <FORM name=myForm> <INPUT name=rads id=check1 type=radio value=val1> <INPUT name=rads id=check2...
2
by: jw56578 | last post by:
if i have an Input type Image how am i suppose to programatically submit it through JS. code: <INPUT type="text" onkeyup="javascript:if(event.keyCode==13){btnClick.click();}"> <INPUT...
1
by: champ.supernova | last post by:
Hi, I have a form which has a few different submit links, all of type image. This is critcal to the operation of the form, as it relies on the image co-ords being passed to another page, the...
1
by: dwa | last post by:
This is a bit off-topic, but... Is it possible to write client side script that can address INPUT controls with a type of "image" which will work under Netscape/Mozilla? <INPUT type="image"...
3
by: jackiepatti | last post by:
QUESTION: I have a web page containing a form that contains an image instead of a submit button, e.g. <form name='myform' action='get' method='otherpage.asp'> <input type='image'...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.