Link to home
Start Free TrialLog in
Avatar of Phil_CH
Phil_CH

asked on

Default value in browse button

Hello,
I can't manage to display a value in the browse field
(it work with all other kinds of fields):

<? $real_path = realpath ($JinglePathWAV); ?>

<? echo $real_path ?> // it works

<input type="file" name="jinglepath"
style="font-face : Arial, Helvetica, sans-serif ;
font-size : 9px" id="JinglePath"
value="<? echo $real_path ?>" size="35">//doesn't work:-(


// it doesn't work either with value="aaa"

according to the specs:

http://www.w3.org/TR/html4/interact/forms.html#h-17.4

"17.4.1 Control types created with INPUT
The control type defined by the INPUT element depends on the value of the type attribute:
...
file:
Creates a file select control. User agents may use the value of the value attribute as the initial file name"

so it surely possible but I don't know why it doesn't works... I'm open to any suggestions!
ASKER CERTIFIED SOLUTION
Avatar of knightEknight
knightEknight
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
however, as vettranger pointed out, there may be some third-party controls (ActiveX,Applets) that will allow you to do this.
also, in the specs you cite, apply only to input types of text, radio, checkbox, button, and hidden -- with respect to the value attribute.  (input type=file does not apply)
Avatar of Jonza
Jonza

i think it isn't possible, because the purpose is that client itself chooses the file location.

i tried to change it with javascript but that didn't work either..

my answer is: NOT POSSIBLE... sorry.
damn, you were faster :)
This question has been classified abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.

<note>
Unless it is clear to me that the question has been answered I will recommend delete.  It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.
</note>

If the user does not know how to close the question, the options are here:
https://www.experts-exchange.com/help/closing.jsp


Cd&

This question is surely in the PAQ already, but still, our answers are correct.
It is time to clean this abandoned question up.

I am putting it on a clean up list for CS.

<recommendation>
points to knightEknight  -- grade A

</recommendation>

If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

Cd&