I am using this script to put a Button INSIDE the Upload Div.
The file is being uploaded properly, however I need to be able to rename the file when it is uploaded as well as store the file path in the database.
How do I do a Button_Click event when using this JavaScript created button?
| <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 = "Upload My XML Now"; |
| 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> |
The file is being uploaded properly, however I need to be able to rename the file when it is uploaded as well as store the file path in the database.
How do I do a Button_Click event when using this JavaScript created button?