title: jQuery to get an image from server and display as popup
body: <p>I have images in a server, and I want them to be displayed as a popup.</p>
  
  <p>The workflow is as follow: </p>
  
  <p>1- I get the id of the row where I want to display the image.<br>
  2- I make an Ajax call using the id in order to get the image name from the server.<br>
  3- I return the image as an &lt; a >, like this:</p>
  
  <pre><code> $options2.= "&lt;a href=\"/js/images/up/".$name."\"\" data-jbox-image=\"gallery1\" title=\"My image\"&gt;&lt;img src=\"/js/images/up/".$name."\"\" alt=\"\"&gt;&lt;/a&gt;";
  </code></pre>
  
  <p>4- But on receiving this I have to display it as a popup. There's where I'm struck. I can show it in a div. But how do I show it in a popup?</p>
  
  <p>5- I searched and got a popup for it like this- but i am getting the image <strong>dynamically</strong> , so dont know how to apply this.  </p>
  
  <pre><code>new jBox('Image');
  
     &lt;a href="/image1_large.jpg" title="My title 1" data-jbox-image="gallery1"&gt;&lt;img src="/image1_small.jpg" alt=""&gt;&lt;/a&gt;
  </code></pre>
  
  <p>Please give me some guidance.</p>
  
  <h2>EDIT</h2>
  
  <p>Alsoi have no image in the current page just a button where i want to use ajax call to <strong>return back the image as popup</strong></p>