Forum Moderators: open

Message Too Old, No Replies

copying variable?

         

ajifri

2:26 pm on Jan 26, 2003 (gmt 0)

10+ Year Member



Hi,
wrote this code copy the variable from textbox to file load


<script language="vbscript">
sub b1_onclick
document.MyForm.textbox1.value = docuement.MyForm.upload
end sub
</script>

but i always got [object], I don't know why, and when i use another textbox insted of upload file it will success.

any idea?

wardbekker

2:34 pm on Jan 26, 2003 (gmt 0)

10+ Year Member



hi ajifri,

You need to retrieve the value property of the upload object;

document.MyForm.textbox1.value = document.MyForm.upload.value

Notice the .value

ajifri

4:18 pm on Jan 26, 2003 (gmt 0)

10+ Year Member



i did it befor but it was not work. BTY i'm my file upload is

<input type="file" name="upload" size="20">