[thelist] Styling the input tag button..mmmwahahhahahah!

Jeff Howden jeff at jeffhowden.com
Mon Mar 31 10:55:20 CST 2003


tom,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Tom Dell'Aringa
>
> Yes yes, I know, its impossible blah blah blah. This is
> just for fun at this point.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

until you've got so much time invested into it you start pulling your hair
out looking for a solution.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> The below little snippet works in IE. [...]
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

that's debatable.  i'm sure it does what you say it does, but i'm quite
confident in saying that the file upload will no longer upload a file.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> The file input object is merely set not to display and
> the button calls the click() method of the input button.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

and it's the very call to the click() method of the file input that causes
it to not work, unfortunately.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> Then, on the onchange event of the input object, I toss
> in the value (the file selected) into my text box.
> Neato.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

i'd call it neato if the file input actually still worked.  however, since
it won't, i'd say it's novel at best.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> I'm assuming (heh) that even though the display of the
> input object is set to display: none, it will still
> function correctly.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

you assume too much.  unfortunately, it will not function correctly.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> <input type="file" name="fi" style="display: none;"
> onchange="this.form.tx.value = this.value;" />
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

a file input does not have an onchange event handler.

http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/input_file
.asp

.jeff

http://evolt.org/

NOTICE:  members.evolt.org web and email address are changing!
---------------------------------------------------------------------
| OLD:                            | NEW:                            |
| jeff at members.evolt.org          | evolt at jeffhowden.com            |
| http://members.evolt.org/jeff/  | http://evolt.jeffhowden.com/    |
---------------------------------------------------------------------





More information about the thelist mailing list