foreach (DataRow dRow in ds.Tables[0].Rows)
{
string qry = "SELECT DISTINCT Sender, Receiver FROM Message WHERE Sender='" + dRow["UserName"].ToString() + "'and receiver ='" + username+"'";
SqlDataAdapter da = new SqlDataAdapter(qry, conn);
DataSet ds3 = new DataSet();
da.Fill(ds3);
conn.Close();
if (ds3.Tables[0].Rows.Count > 0)
{
sb.Append("<li><a href =''" + "onclick='OpenChatBox(dRow["UserName"].ToString(),dRow["User1"].ToString())'>" + dRow["UserName"].ToString() + "</a></li>");
}
ChatContent.InnerHtml = sb.ToString();
}
this is the javascript function which i ma calling...
<script language="javascript">
function OpenChatBox(sender, receiver) {
var win = window.open("ChatBox.aspx?agent=" + sender + "&user=" + receiver, "", "status=0,toolbar=0, menubar=0, width=490, height=650");
}
</script>
sorry here is the complete code
in this code i ma trying to create hyperlink and calling javascript function with two parameters on click of hyperlink its not working...it works fine when i pass no parameters..