display image as tooltip in anchor tag from database

Posted by Klbaiju under jQuery on 7/19/2012 | Points: 10 | Views : 1946 | Status : [Member] | Replies : 2
Hi,

I want to display tooltip image on anchor using jquery.

onmouseover event the id is passed to another page ,process and return back.

image is coming from database as binary

i try this code

<script type="text/javascript" language="javascript">

function GetImage(id) {
// alert(id);
$.post("Imageprocess.aspx", { id: id }, function (data1) {

('#disp').html(data1);
});



}

<a onmouseover=GetImage('"+ds.Tables[0].Rows[i][0].ToString()+"') href='../FundAnalysis/AMCWiseSchemeSummary.aspx?AMC_REPRESENT=" + ds.Tables[0].Rows[i][0].ToString() + "&AMCNAME=" + ds.Tables[0].Rows[i][1].ToString() + "' style='color:#5F5F5A; font-family:verdana;font-size:12px; text-decoration:underline;' ><span >" + ds.Tables[0].Rows[i][1].ToString() + "</span></a>

*****************************************************

imageprocess.cs

string id = Request.Form["id"].ToString();
SqlCommand cmd = new SqlCommand("select * from AMC where id="+id+" ", con);
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
DataSet ds = new DataSet();
da.Fill(ds);
Response.Write("<table border= '0' width='250px' >");

Response.Write("<tbody>");
foreach (DataRow drow in ds.Tables[0].Rows)
{
byte[] imageContent = (byte[])((drow["AMC_LOGO"]));
Response.BinaryWrite(imageContent);
Response.Write("<tr><td VALIGN='top'> <img width='100px' src='Response.BinaryWrite(imageContent) '></td></tr>");
}


Response.Write("</table>");

but not working .

anybody know thanks in advance.



Regards

K L BAIJU




Responses

Posted by: Jayakumars on: 9/29/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

try this code


function Jscript1() {
// var t1 = document.getElementById("Button1").value;
var t1=document.getElementById("Button1");
var t2=t1.title;
alert(t2);
}



Mark as Answer if its helpful to you

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 9/29/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi
Please mark as answer if it helpful to you.

Mark as Answer if its helpful to you

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response