title: JQuery - set an image src on button click
body: <p>I have a Jquery dialog, which opens up on click of a link.
  This click populates the dialog using AJAX. One of the things I need to do is populate it with an image based on the ID coming back from the data returned from the AJAX method.
  The images in the site use and ImageHandler to display images like so:</p>
  
  <pre><code>~/ImageHandlerDefault.ashx?id=1467
  </code></pre>
  
  <p>This works great, But is there a way I can set an image using the AJAX web method or does it need a postback?</p>
  
  <p>I have attempted to hard code a value but this has not worked:</p>
  
  <pre><code>  $('.openwoimage').attr('src', '~/ImageHandlerDefault.ashx?id=1467');
  </code></pre>
  
  <p>I can change the alt etc but the src is nto working.</p>
  
  <p>Does anyone have any advice or a better way of doing it?</p>
  
  <p>thanks</p>