bhagirathi
bhagirathi

Reputation: 531

mouse down event is not firing in IE browser

I am trying to create an anchor with a mousedown event.

My Code

for (i = 0; i < userDetails.length; i++) {
                    var userProfileURL = "http://www.xyz.com/KLMS/UserProfile.aspx?userid=" + userDetails[i][1];
                    userTable += "<li><a href=\"" + userProfileURL + "\" onmousedown=\"StoreClickedURL(" + userId + ",'" + encodeURI(userInput) + "','" + encodeURI(userDetails[i][3]) + "')\" title='" + userDetails[i][2] + "'>" + userDetails[i][2] + "</a></li>";
                }

By using FireBug I inspect the anchor it is showing like this

<a href="http://www.xyz.com/PublicProfile.aspx?id=1088" onmousedown="StoreClickedURL(1,'physics','http://www.xyz.com/PublicProfile.aspx?id=1088')">http://www.xyz.com/PublicProfile.aspx?id=1088</a>

It is working in all browser except IE. In IE also it is showing the same style anchor what I have mentioned above.

but not going to the function declared in the mousedown event.

Please help

thanks in advance.

Upvotes: 0

Views: 801

Answers (1)

user1811989
user1811989

Reputation:

try this

< a href="javascript:StoreClickedURL(1,'physics','xyz.com/PublicProfile.aspx?id=1088');window.location = 'xyz.com/PublicProfile.aspx?id=1088'">

Upvotes: 2

Related Questions