Jump to content

Image for File Uploader


beennn

Recommended Posts

I've been looking about and cant seem to find how to have an image as a file uploader instead of the default choose file button
<input type="file" />

any help would be great

Hi beennn, Greetings to you Mate :) It should be as: <input type="image" name="Submit" value="Submit" src="images/File-Upload.png" /> By the way, please visit the following link: http://w3schools.inv...showtopic=43240 and let me know if you would be interested to Join Me to start-up that Venture.
Link to comment
Share on other sites

Hi beennn, Greetings to you Mate :) It should be as: <input type="image" name="Submit" value="Submit" src="images/File-Upload.png" /> By the way, please visit the following link: http://w3schools.inv...showtopic=43240 and let me know if you would be interested to Join Me to start-up that Venture.
That makes the submit button an image, not the "Chose File" button.As for making the Choose File button an Img... I dont know. I haven't even figured out how to change the text Choose File to something else.
Link to comment
Share on other sites

<html><head><script language="javascript">function getFilePathFromDialog() {  document.getElementById('fileBrowser').click();  document.getElementById('filePath').value = document.getElementById('fileBrowser').value;}</script></head><body><img src="../../../wamp/www/images/browse_button.png" onlick="getFilePathFromDialog();"><input type="text" id="filePath" name="filePath" /><br /><input type="file" id="fileBrowser" name="fileBrowser" style="visibility:hidden; display:none;" /></body></html>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...