views:

26

answers:

2

trying to change a websites text entry field that is currently set to read only to false. The reason being it has an 'Upload" button where you browse to the file on your computer then hit upload. I just want to set the path in a script but since the text field is read only i cannot. Any other ideas would be appreciated.

thanks

+1  A: 

A file input is not the same as a textfield. Changing the textfield text to display the file path won't magically make your browser upload the associated file. In fact, if this were doable with Javascript, it would be a huge security hole.

Anon.
+1  A: 

It sounds like you're describing an <input type="file">. If so, you can't manipulate its value via JavaScript. It's a security risk and JavaScript won't allow it.

twernt