title: Javascript make objects appear when searched for
body: <p>I'm making a website that has a map of a campus on it and the idea is that the user clicks on a particular building, bringing them to a new page which then prompts them to enter the room's code.  That I've got under control, but what I don't know how to do is to have a little marker appear on the location of the room on the map (bearing in mind that each building has multiple rooms). The entire webpage needs to dynamically alter its size (ie the map itself is a variable-sized image), so I can't simply put markers on top of the image.  How can I make it so they enter the room code (eg they enter '101') and a marker (say an image) will appear at the location of that room (see images below).</p>
  
  <p><img src="https://i.stack.imgur.com/uAvFo.png" alt="enter image description here"></p>
  
  <h2>Edit</h2>
  
  <p>I am currently using the source below.  As you can see, I use a prompt box to get the room code, and what I want is to get a particular image and position it at a specified position.</p>
  
  <pre><code>    &lt;script language="Javascript"&gt;
          var roomCode = prompt("Please enter the room code", "Enter room code here");
          if(roomCode==='101')
          {
              /*Put image in particular location*/
          }
          else if(roomCode==='102')
          {
              /*Put image in particular locationr*/
          }
          else
          {
              alert("That room does not exist.  Please refresh the page and try again.");
          }
      &lt;/script&gt;
  </code></pre>