Note that the div prior to the script element needs to be all on the same line - if you split it over multiple lines it breaks. You'll need to replace the anchor hrefs with your target pages (or have onclick handlers).
Note also that this is reliant on Salesforce not changing their css class names, which is always a possibility. If that's a big concern, its worth duplicating these classes into your own stylesheet and namespace.
I want the href to point back to my controller which as the view state...put it another way, I just want to call different actions, similar to a commandButton action attribute. I guess I could write some javascript and perhaps use actionFunction or something.
It may work with command links - I've not had to go that route so I can't say for sure. If it can't, you should be able to add an on click handler to the anchor tag and invoke an action function that way.
I've done this in the past through scraping the Salesforce HTML that generates these sort of buttons.
Here's an example:
Note that the div prior to the script element needs to be all on the same line - if you split it over multiple lines it breaks. You'll need to replace the anchor hrefs with your target pages (or have onclick handlers).
Note also that this is reliant on Salesforce not changing their css class names, which is always a possibility. If that's a big concern, its worth duplicating these classes into your own stylesheet and namespace.
Thanks Bob.
I want the href to point back to my controller which as the view state...put it another way, I just want to call different actions, similar to a commandButton action attribute. I guess I could write some javascript and perhaps use actionFunction or something.
Bob, this works, but the drop-down ONLY appears for the button on top, and nothing shows up when the lower button is clicked on. Any ideas? Thanks.