VK schrieb:
> > div.photoUpload input.fileUpload { display:none; }
>
> That's what you should start with. So are we making "custom" file
> control with the real one hidden, eh?
That's correct, because my customer wants to have a single design
through the whole project. The more so, the page must be facilitated to
switch among several languages, independently on the current OS on the
user machine.
> Form control with display:none is ignored by IE, that is the problem.
It is obviously not, as my alert witnesses. But its content gets
apparently only displayed, not sent - and that's the problem...
> If you are really targeted to give your visitors a visual impression
> that someone is hacking their computer - in such case use the image or
> iframe hack - so leave file control visible but cover it with an image
> or iframe with something joyful (or blank).
I tryed even to let the file input visible - it does not change the
behaviour of the form. My Send link displays the alert with the correct
file name, which has been selected by user with the Open button, and
that's all...
> Note
> "visual impression that someone is hacking their computer" because no
[quoted text clipped - 14 lines]
> clicks on file controls and read file control value - all with the
> default security settings. Lucky Firefox is not one of them.
All these considerations sound reasonably, but what about a different
point of view :
You cannot specify any style for the input 'File' - at least all of
them get ignored by any major browser. So you have to accept that on
your beautifully and carefully designed page appears an ugly button
with system color reading stubbornly in the language of the current OS
"Durchsuchen..." where all the rest is in a quite different language...
There are many cases in the world when the user does not even
understand the language of the OS, because he is an emigrant and tryes
to stay in contact with his origins through the URL I am intended to
provide for him...
I find this security policy not especially well-grounded. Allowing
styles for input file could be a sound compromise here.
> Enclosed a little test to check if the current UA allows to make
> virtual clicks on file controls and to read their values run-time:
[quoted text clipped - 20 lines]
> </body>
> </html>
Thank you VK for this small test listing. Regrettably, it could not
bring me any further in solving my problem...
Victor
VK - 27 Dec 2006 21:24 GMT
> > Form control with display:none is ignored by IE, that is the problem.
> It is obviously not, as my alert witnesses.
Correction: display:none elements are not submitted, "ignored" was
indeed an ambiguous term.
> > Note
> > "visual impression that someone is hacking their computer" because no
[quoted text clipped - 9 lines]
> > controls have. From the other side you're getting something much more
> > important than that: a non-compromised trust from your visitor.
> All these considerations sound reasonably, but what about a different
> point of view :
<snip>
Feci quod potui faciant meliora potentes...
You're getting more long-run troubles than short-time benefits, trust
me - but if it's indeed a question of life or death (or your New Year
bonus) then
<http://www.quirksmode.org/dom/inputfile.html>
Victor - 30 Dec 2006 19:04 GMT
> You're getting more long-run troubles than short-time benefits, trust
> me - but if it's indeed a question of life or death (or your New Year
> bonus) then
>
> <http://www.quirksmode.org/dom/inputfile.html>
Thank you VK for your compassion !
You know, I used just this technique - as described in the link - and
it brought me success -- however only with the FireFox ;-( The same
code does not produce the wanted result in the MSIE, that is the
problem...
Victor
VK - 30 Dec 2006 19:39 GMT
> You know, I used just this technique - as described in the link - and
> it brought me success -- however only with the FireFox ;-( The same
> code does not produce the wanted result in the MSIE, that is the
> problem...
The "zero opacity" trick from
<http://www.quirksmode.org/dom/inputfile.html> works for my IE 6 as
well. That must be again extra implications from your own code.
You have to take the sample exactly as it is and build the rest of the
form around it checking after each change.
P.S. Best of all of course to leave poor input="file" in peace ;-)
Victor - 31 Dec 2006 14:57 GMT
> The "zero opacity" trick from
> <http://www.quirksmode.org/dom/inputfile.html> works for my IE 6 as
> well. That must be again extra implications from your own code.
> You have to take the sample exactly as it is and build the rest of the
> form around it checking after each change.
You were right, VK ! Thanks a lot !
> P.S. Best of all of course to leave poor input="file" in peace ;-)
Cannot agree. This would be the worst case.
Surely, if there were no workaround, I would have to accept it. But
then I would create a decorative visual wrapper around it with a
mournful comment like this 'This way looks a secure browser. The
programmer does not bear any responsiblity for this owful lookout.'
Best regards and Happy New Year.
Victor