Think this is a quickie for someone. I have this markup (generated by ASP.Net)…
<A id=anchorO href="javascript:__doPostBack('anchorO','')">O</A>
This anchor is in an update panel, and if I click it manually a partial postback takes place. However….
$('[ID$="anchor'+initial+'"]').click() //JavaScript
..selects the correct anchor, but no postback takes place. Why is this?
A click and a href are seen as two different things in Javascript, so you can’t do
.click()and call the href, regardless if this is callingjavascript:or notTwo options:
Just do:
Be evil and use eval: