Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fileupload object properties

Status
Not open for further replies.

luftwalk

Programmer
May 15, 2001
9
SI
Hi!

I have a problem I'd like some help with. I have two form objects in my form. One of them is a textarea object and the other one is a fileupload object.What I want is this:

when I click on the textarea (when it receives focus) I want the data in the fileupload object to disappear and vice versa. The problem is that the value property of the fileupload object is read-only :(

Another thing I'd like to know is if the "Browse..." button or more specifically its' label can be changed. So it wouldn't read "Browse..." anymore but something else.

Tnx for your help,

Bostjan
 
Hi,

Check Thread215-55787 on this.

And indeed, the file field is read-only so you can't change it. (Alas).

Gtz,

Kristof
 
Kristof,

I visited the thread you sent me and thanks, but I still have a problem. I changed the code I found there a bit to suit my needs, but it still refuses to work in netscape.
This is what I have:

<input type=&quot;file&quot; name=&quot;slika&quot; style=&quot;display:none&quot;>
<input name=&quot;alternate&quot; type=&quot;text&quot; class=&quot;tekst&quot; disabled> <input type=&quot;button&quot; name=&quot;browse&quot; value=&quot;Prebrskaj&quot; onClick=&quot;document.vnosnik.slika.click(); WashMe(); CheckForActive(2);&quot; class=&quot;tekst&quot;>

as you can see &quot;slika&quot; is the name of the fileupload object and &quot;vnosnik&quot; is the name of the form that &quot;slika&quot; is situated in. -- the names will probably seem foreign to you, but that is only because they are :).

the problem is, that the onClick event on the button does not work. That is, the first sentence causes the error. Netscape returns an error saying that: &quot;document.vnosnik.slika has no properties&quot;. It works fine in explorer. I'd really appreciate any help you might offer.

Tnx

Bostjan Brumen
 
Hiya,

Indeed, that's the downside of the sollution, it will only work on IE.

It isn't possible on NS. I've been trying to find a sollution, but haven't found one. So nowadays I tell the customer yes, it's an ugly button but it can't be helped so live with it (ofcourse a bit more diplomatic than that :) )

So basically, can't be done. Alas.

Gtz,

Kristof
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top