WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7 image preview (1 post)

  1. tomi35
    Member
    Posted 2 years ago #

    Hi!
    I want to make a form with the contact form 7 plugin and i want to make in the dorm an uploader
    input to upload images and I want to insert a preview to the end of the form. I have a javascript
    code for this:

    <script type="text/javascript" src="http://iphonefanatic.hu/wp- <script type="text/javascript"> <!-- function onFileLoad(e) { $('#preview').append('<img class="preview" src="'+e.target. } function displayPreview(files) { var reader = new FileReader(); reader.onload = onFileLoad; reader.readAsDataURL(files[0]); } //--></script>

    and the picture appears where the
    <span id="preview"></span>
    code It's only working when I put the page's source to an HTML file.
    Can anyone help me?
    (sorry for my bad english)

Topic Closed

This topic has been closed to new replies.

About this Topic