This is a migrated thread and some comments may be shown as answers.

Radupload display filenames client side

3 Answers 173 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Chamira
Top achievements
Rank 1
Chamira asked on 22 Feb 2010, 06:03 AM
I have a rad uploader with customized fields.. ( eg. description , title )

But I want to display the file name after clickin the browse button
i need to display the file name on the right side of the uploader ( client side )
there is a method of displayin all files using alert..

but I am still unable to make it work one by one..

thanks in advance

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 22 Feb 2010, 07:21 AM
Hello Chamira,

I am not quite sure about your requirement. I hope you want to display the filename after selcting using RadUpload. If so you can use the following client code to get the file name and set the filename as value for Label control to show on page.

javascript:
 
<script type="text/javascript"
    function OnClientFileSelected(sender, args) { 
        var url = sender.getFileInputs()[0].value; 
        var fileName = url.substr(url.lastIndexOf('\\')+1, (url.length - 1)); 
        alert(fileName);         
        // Set the filename to the Label value 
    } 
</script> 
 

Thanks,
Shinu.
0
Chamira
Top achievements
Rank 1
answered on 22 Feb 2010, 07:26 AM
Hello shinu.. thanks for the reply..
Yes you answered my question .. But now I am facing the problem of applyin that value inside the additional fields
for example

I want to have an additional field ( Label ) and display each full path once selected

ill put a screen shot

http://i45.tinypic.com/9ao9xt.jpg

the red text can be a label inserted in the additional fields

thanks in advance



0
Chamira
Top achievements
Rank 1
answered on 22 Feb 2010, 09:43 AM
I completed this.. thanks for the help shinu...


Tags
Upload (Obsolete)
Asked by
Chamira
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Chamira
Top achievements
Rank 1
Share this question
or