title: Open image in a new window using Razor and javascript
body: <p>I'm trying to open in a new window a new full size image from each one. I'm using this code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function openImage(imageUrl) {
      window.open(imageUrl);
  }
  </code></pre>
  
  <p></p>
  
  <pre><code>@foreach (var image in Model.Images)
  {
          &lt;img src="@Url.Action("Thumbnail", "Done", new { width = 150, height = 150, file = @imagen.filename })" alt="@imagen.filename" onclick="openImage('@Url.Content(ViewBag.Path + @imagen.filename)')" /&gt;
  }
  </code></pre>
  
  <p>But using this when I click on a image it can't open anything.</p>
  
  <p>Can you help me with this issue?</p>
  
  <p>Thank you in advanced</p>
  
  <p>EDITED the function openImage due to wrong code</p>