cancel
Showing results for 
Search instead for 
Did you mean: 

How to reference javascript on single page

How to reference javascript on single page

Hi all,

I'm very new to Magento.

Can someone please help me out.

I have simple link on  the  CMS block <a href="/mypage/details/"  onclick="return charges();">Details</a>

clicking on this link suppose to take customer to another Magento page where I'm opening accordion using javascript(javascript is working on console,but  not through clicking on the link on first page.

 

I'm referencing this script on target page as follow in Layout xml :

<reference name="head">
        <action method="addJs"><script>js/cms/myfolder/myscriptfile.js</script></action>
    </reference>

  It does not give me errors but it's not doing what I intended to.

 

Thanks in advance.

1 REPLY 1

Re: How to reference javascript on single page

Which Layout xml file precisely?

Tanel Raja