My problem is that I got two aspx controls created as follows:
<a id="sortByDate" href="javascript:__doPostBack('sortByDate','')">Date</a> <a id="sortByLastName" href="javascript:__doPostBack('sortByLastName','')">Last name</a>
so that these links allow you to sort the results. I am trying to put this in a combobox instead of using links.
So I made it like this
<select id="sortBySelect" onchange="javascript:sortBy(this);"> <option value="sortByLastName">Last name</option> <option value="sortByDate">Date</option> </select>
using this javascript function
function sortBy(sel) { var id = sel.value; $("#" + id).trigger("click"); }
Therefore, when you change the selected item in combobox, I want to trigger the click event on the link to trigger the dopostback sort.
Heβs not doing anything yet. I tried "click", "onclick", "onClick" and nothing works. Unfortunately, this is IE quirks mode.
I know this is really not elegant, but I have a very short time and I need something quick and dirty. In the end, I will be able to control aspx to handle this.
Any ideas how I could make this work in quirks mode?
thanks
source share