I have a page with an anchor tag. In my JavaScript I am setting the HREF
attribute of the anchor tag dynamically based on some if-else conditions. Now I want to invoke the click event of the anchor tag programmatically. I used the below code, but was not successful.
var proxyImgSrc="CostMetrics.aspx?Model=" + model +"&KeepThis=true&TB_iframe=true&height=410&width=650";
document.getElementById("proxyAnchor").href=proxyImgSrc;
document.getElementById("proxyAnchor").onclick;
Can any one tell me how to go ahead? I have a jQuery light box implementation(thickbox) on this link.
Kindly advise. Thanks in advance.