-
Form Upload - Image to replace browse button
I have learned from some web references that I can use image in place of default
browse button in file uploading, something that look like the following:
----------------------------------------------------------
<input type="file" name="filename" style="display: none;" onchange="fullfilepath.innerHTML
= this.value;"/>
<span id="fullfilepath"> </span>
<img src="someimage.gif" onclick="filename.click();" />
<input type="submit" value="submit" />
----------------------------------------------------------
When I hit the submit button (type submit), it didn't get submitted the first
time, so I had to click it again and it go through, but the attachment was
somehow not included.
I tried to replace the submit button with a type="button" and use some javascript
to do the .submit(). Then I got access denied error.
Does anyone knows the workaround of this? Thanks!
AC
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks