Click to See Complete Forum and Search --> : can't see the image from a <input type="image">


chuckdawit
12-11-2007, 03:01 AM
I can't see the image from an input tag I'm using. It comes up as broken.
<td width="200" align="center"><input type="image" src="la.gif" name="la"></td>

This is a perl script that is located in the cgi-bin folder of Apache.
The image is also located in the cgi-bin file.
Do I need to put the image in another folder? Or do I need an absolute link to the image? Any help would be appreciated. THanks.

fahlyn
12-12-2007, 07:20 PM
This isn't a Perl question...its an HTML question...anyway here is your answer.

There is no such thing as an <input type="image"> you can't input an image on a screen. there is an <input type="file"> to upload or an <img src="pagetoimage"> . I'm guessing that you're looking for <img src="path.jpg" />.

Happy Coding.
Fahlyn

dragle
12-13-2007, 08:28 AM
Your cgi-bin is most likely setup to execute all requested files within it when they are "delivered" to the browser; and since an image is not an executable it is not retrieved properly. So, the easiest answer is to move the image to a different folder (one that typical documents or images can be served from). And then be sure to update the path in the src to reflect the new location, of course.

fahlyn, the <input type="image" .... /> is a valid tag within a form. See:

http://www.w3.org/TR/html401/interact/forms.html#h-17.4

HTH,

fahlyn
12-13-2007, 08:06 PM
That is very interesting, I guess I learned something today. I can't say that I can see that as being very useful, however I'm sure it has its uses...thanks dragle.

Any way you slice it...this doesn't seem to be a perl issue.