Jump to content

using javascript for the browse button on a file form


lead2gold

Recommended Posts

Within a form when you use the input type "file" you get that common browse button that is as ugly as the submit buttons :). Seeing how you can use the <forminfo>.Submit(); and replace the submit with a hyperlink with beautiful CSS styles associated with it. Can you not do the same for the browse? Like completely hide it and replace it with a javascript line?

Link to comment
Share on other sites

Actually you can use css on a browse button you can not hide trhe browser button and use a custom made one to submit an upload. I think the syntax for styling a file control box is this:
[code]input[type=file] {
    //css code is here
}[/code]
Link to comment
Share on other sites

[!--quoteo(post=360378:date=Mar 31 2006, 09:31 AM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Mar 31 2006, 09:31 AM) [snapback]360378[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Actually you can use css on a browse button you can not hide trhe browser button and use a custom made one to submit an upload. I think the syntax for styling a file control box is this:
[code]input[type=file] {
    //css code is here
}[/code]
[/quote]

Great! thank you, i will try it out!

Edit: found this website: [a href=\"http://www.quirksmode.org/dom/inputfile.html\" target=\"_blank\"]http://www.quirksmode.org/dom/inputfile.html[/a] to preform this task, but it just doesn't seem worth it... incompatiblity starts at IE5... I'll just use the basic one...
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.