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?

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]
[!--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...

Archived

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

×
×
  • 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.