3
Reply

Passing ImageUrl in Javascript function

Manoj Bisht

Manoj Bisht

Dec 18 2007 12:24 AM
6k
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)