Thanks for replying.
I will try it with XSL.
Do you know if it's possible to get the Data View Web Part to display the Custom Actions normally? (same as the List Form Web Part does). If the Data View Web Part would display same items on its dropdown as the List Form Web Part then there would be no need for this javascript hacking.
Steps to recreate the issue i am seeing:
1. In Internet Explorer open SharePoint.
2. Open any List and navigate to the AllItems.aspx view.
3. Dropdown the menu on any list item and you should see all menu items that you have permissions to see. e.g. Manage Permissions, Workflows, View Item, Edit Item etc.
4. In SharePoint Designer open normal AllItems.aspx View from the same list you opened above.
5. Right-click on the List Form Web Part.
6. Choose Convert to XSLT Data View from the resulting context menu.
7. Save your modifications as a new view.
8. Navigate to that view in Internet Explorer.
9. Dropdown the menu on any item in the list.
10. Note that only 4 menu items appear. i.e. View Item, Edit Item, Delete Item, Alert Me.
What the deuce? :o The DVWP doesn't show menu items that you have permissions to see.