Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How can I add “onClick” in the header links? #SOLVED# (see message)
 
Syndia
Member
 
Total Posts:  38
Joined:  2008-04-01
Netherlands, The
 

I want to add an “onClick” in one of the links in the header, is it possible to do this?

[edited]
Ok after almost 2 hours I have found it. For people who also wants to add onClick to an url I, the example is below wink

Example file: magento\app\design\frontend\pricoll\default\layout\customer.xml

<action method="addLink" translate="label title" module="customer"><label>Log In</label><url/><title>Log In</title><prepare/><urlParams/><position>100</position><li/><a>onClick="toggleLogin()"</a></action>
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top