Manoj Bisht

Manoj Bisht

  • NA
  • 145
  • 0

Passing ImageUrl in Javascript function

Dec 18 2007 12:24 AM
Hello Friends,

I want to send the ImageUrl fetching from the database to the Javascript function

<img onmouseover="javascript:doTooltip(event,0,'<%# DataBinder.Eval(Container.DataItem,"Image") %>')" onmouseout="hideTip()" id="myImage1" name="myImage1" src='<%# DataBinder.Eval(Container.DataItem,"Image") %>' Runat="server" Height="125" Width="125" />


But this piece of code throwing an Parser Error given below

The server tag is not well formed.



But if i give the path of a particular image then it works great....as given below


<img onmouseover="javascript:doTooltip(event,0,'Images/img1.jpg')" onmouseout="hideTip()" id="myImage1" name="myImage1" src='<%# DataBinder.Eval(Container.DataItem,"Image") %>' Runat="server" Height="125" Width="125" />

Answers (3)