Upload Layout

Thread is closed for posting
3 posts, 1 answers
  1. John
    John avatar
    88 posts
    Member since:
    Nov 2007

    Posted 13 Jun 2008 Link to this post

    In all the demos the upload button is outsde the radupload box, is there anyway to get the Upload button inside the box, my users are finding it confusing to have that button outside the box.
  2. Answer
    Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 17 Jun 2008 Link to this post

    Hi John,

    Here is how you can achieve this - add the following javascript to your page:

    <script type="text/javascript"
    function pageLoad() 
        var upload = $find("<%= RadUpload1.ClientID %>");    
        var uploadDiv = upload.get_element(); 
         
        var input = document.createElement("input"); 
        input.type = "submit"
        input.className = "ruButton"
        input.value = "Submit"
        input.id = input.name = upload.getID("submit"); 
         
        //the UL element of the upload 
        var ul = uploadDiv.getElementsByTagName("UL"); 
        //the array of all LI elements of the UL element 
        var LIs = ul[0].getElementsByTagName("LI"); 
        //Last LI item - the button area 
        var lastLi = LIs[LIs.length - 1]; 
        lastLi.appendChild(input);    
    </script> 

    I hope this helps.

    All the best,
    Veskoni
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. John
    John avatar
    88 posts
    Member since:
    Nov 2007

    Posted 24 Jun 2008 Link to this post

    Thanks thats what I was looking for.

    John
Back to Top