adding image to upload

Last post 06-17-2013, 12:26 PM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  06-14-2013, 3:07 PM 77562

    adding image to upload

    Hi. I'd like to add an image to click on and upload files instead of a button. This is my original code:

    I remove the code in RED  and add the code in GREEN but it doesn't work.


    <%
                Dim uploader
                Set uploader=new AspUploader
                uploader.MaxSizeKB=10240
                uploader.Name="myuploader"
                uploader.UploadType="Auto"
    uploader.InsertButtonID="uploadbutton"

                uploader.InsertText="Click Here to Select Files (up to a maximum of 10 Megs)"

                uploader.MultipleFilesUpload=true
                uploader.ManualStartUpload=true
                    uploader.SaveDirectory="../temporaryuploads/"
                    uploader.AllowedFileExtensions="*.jpg,*.png,*.gif,*.jpeg"   

                uploader.MaxFilesLimitMsg="Your maximum number of files has been reached."
                uploader.MaxFilesLimit= allowpic

                %>
                <%=uploader.GetString() %>
                <br /><br /><br />
    <br>
            <img id="uploadbutton" alt="Upload File" src="/graphics/uploadpic.png" />   

        <button id="submitbutton" onclick="doStart();return false;">START UPLOAD</button>
    <br><font color=black size=1>You may insert an optional watermark which will appear in the bottom of your photo:
    <br><input class=black type="text" size=22 maxlength=32 name="watermark">
                </form>
                <br/><br/><br/>

    Help?? (I also need the onclick part in the working version) 

  •  06-17-2013, 12:26 PM 77566 in reply to 77562

    Re: adding image to upload

    Hi,

     

    To use an img as the upload button, please use property "InsertButtonID".

     

    1.      <%  
    2. Dim uploader  
    3. Set uploader=new AspUploader  
    4.          uploader.InsertButtonID="myUpload"  
    5. uploader.Name="myuploader"  
    6.      %>  
    7.      <%=uploader.GetString() %>  
    8.   
    9.  <img id="myUpload" src="my.jpg" />  
     

    Regards,

     

    Ken 

View as RSS news feed in XML