Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8713907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:27:49+00:00 2026-06-13T05:27:49+00:00

Right now, I am working on a Multimedia-Project for my study. The task is

  • 0

Right now, I am working on a Multimedia-Project for my study. The task is to create a crowdfunding-platform. My problem is the local preview image on the “Create a Project”-page. I used the forum search and came across this:

http://www.xul.fr/en/html5/filereader.php

I copied the code and put it in my HTML/JS Files like this:

This is my HTML-Code so far:

<div class="header">
ICH BIN DER HEADER, HIER KOMMT HEAD-KRAM REIN
</div> <!-- HEADER GESCHLOSSEN -->

<!-- -------------------------1------------------------------- -->

<div class="slideshow">

    <div id="titelbild">

        <input type="file" id="getimage">
        <fieldset><legend>Your image here</legend>
        <div id="imgstore"></div>
        </fieldset> 

    </div> <!-- TITELBILD GESCHLOSSEN -->

    <div id="projektinfos">

        <input type="text" id="titel" maxlength="60" value="Titel" onFocus="if(this.value=='Titel') this.value='';" onBlur="if(this.value=='')this.value='Titel';">

        <select id="rewardfarbe">
            <option selected>Kategorie wählen   </option>
            <option>Rot         </option>
            <option>Grün        </option>
            <option>Blau        </option>
        </select>

        <input type="text" class="textbox" maxlength="60" value="Betrag" onFocus="if(this.value=='Betrag') this.value='';" onBlur="if(this.value=='')this.value='Betrag';">
        <input type="text" class="textbox" maxlength="60" value="Ort" onFocus="if(this.value=='Ort') this.value='';" onBlur="if(this.value=='')this.value='Ort';">  


    </div> <!-- PROJEKTINFOS GESCHLOSSEN -->

</div> <!-- SLIDESHOW GESCHLOSSEN -->

<!-- -------------------------2------------------------------- -->

<div id="details">
</div>

<!-- -------------------------3------------------------------- -->

<div class="footer">
</div>

And my JavaScript-Code:

<script>
function imageHandler(e2) 
{ 
  var store = document.getElementById('imgstore');
  store.innerHTML='<img src="' + e2.target.result +'">';
}

function loadimage(e1)
{
  var filename = e1.target.files[0]; 
  var fr = new FileReader();
  fr.onload = imageHandler;  
  fr.readAsDataURL(filename); 
}

window.onload=function()
{
  var x = document.getElementById("filebrowsed");
  x.addEventListener('change', readfile, false);
  var y = document.getElementById("getimage");
  y.addEventListener('change', loadimage, false);
}
</script>

And my CSS-Code:

.body {

    width: 1280px;
    height: 2000px;
    background-image:url(images/fabric_patterns_2_source_SMALL.jpg); 

} 

/* -------------------------0------------------------------- */

.header {

    margin: auto;
    width: 900px;
    height: 80px;
    background-color:#FFBD91;

}

/* -------------------------1------------------------------- */

.slideshow {

    margin: auto;
    width: 1024px;
    height: 300px;
    background-color: #ACB6FF;

}

#titelbild {

    float: left;
    width: 400px;
    height: 300px;
    background-image:url(images/bildhinzufuegen.gif);

}

#titelbildhinzufuegen {

    width: 400px;
    height: 300px;
    opacity: 0;

}

#projektinfos {

    float: right;
    width: 624px;
    height: 300px;
    background-color:#B6FF98;

}

/* -------------------------2------------------------------- */

#details {

    margin: auto;
    width: 900px;
    height: 1500px;
    background-color: #C0E3FF;

}

#titel {

    font-family: Helvetica,Verdana,Arial,sans-serif;
    font-size: 18px;
    margin-left: 112px;
    margin-top: 20px;
    width: 400px;
    height: 50px;

}

#rewardfarbe {
    width: 200px;
    height: 50px;
    margin-top: 20px;
    margin-left: 312px;

}

.textbox {

    font-family: Helvetica,Verdana,Arial,sans-serif;
    font-size: 18px;
    margin-left: 312px;
    margin-top: 20px;
    width: 200px;
    height: 50px;

}


/* -------------------------3------------------------------- */

.footer {

    margin: auto;
    width: 900px;
    height: 80px;
    background-color: #B0BAFF;

}

Like I said, I copied the Code right from the link at the beginning of my post, but it won’t work…I don’t understand it. Is it possible, that this has to be running on a real Server, because right now, I’m testing all my work with XAMPP.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:27:50+00:00Added an answer on June 13, 2026 at 5:27 am

    Your code is incomplete so it won’t work. It’s not a jsfiddle problem. You can find good documentation about what you are trying to do in this HTML5rocks page. Actually the code is quite similar.

    Also you can take a look at this nice replay in another similar question. It has a working example.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right now I am working on a stub of a project. In the course
Right now I am working on a dll project with several handy .net tools.
I'm having an Android GPS project for my CS class. Right now I'm working
Right now I'm working on a project that extensively uses 64bit unsigned integers in
Right now I'm working on a project, and the team wants a way to
Right now I am working on a project that issues IDs consisting of both
Right now I'm working on an as2 project that requires a large number of
Right now I'm working on small project, submitting very simple jobs and I'm working
Right now I am working with XSLT to create a report in XSL-FO. I
Right now I'm working on a project which requires an integer to be converted

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.