Calling JS File function from Content Page

Hi Guys,I have master page and one content page.I was calling .js file from each content page and was using js function in content page .aspx file and It was working. But my requirement is that I will call that .js file from master page and use it's function from Content page .aspx file ,I tried this like adding script on Master page  and call function on content aspx page but its not working.Please help me asap.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Julian HansenCommented:
Can you post a link or source.
SudhanshumAuthor Commented:
I have one collapseableDIV.js file that file has javascripts like that
function collapse(divName, calcHeight)


Then I have master page where I am adding that .js file reference like that
  <script type="text/JavaScript" src="../../../JavaScripts/collapseableDIV.js"></script>

Then I have one .aspx page which is using above master page and I am calling collapseableDIV.js function
in that .aspx file But its not calling.If I add that script   <script type="text/JavaScript" src="../../../JavaScripts/collapseableDIV.js"></script>  in .aspx file then it works fine.But if i try to add that script on Master page and removed that script from .aspx page then it does not work.
   Please guide.
Where in the master page did you put the script tag?
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

SudhanshumAuthor Commented:
Below this tag
<html xmlns="">
<head id="Head1" runat="server">
Julian HansenCommented:
It would be very useful if we could see a link or some source code. Describing it tells us what you intended to do - not what actually was done. The quickest route to a solution is posting code / link we can look at to try and emulate the problem.

I am assuming you have checked your console window for errors?
SudhanshumAuthor Commented:
I am attaching sample website.I have added reference in master page and accessing function on test.aspx page. Please set test.aspx as startup page.
Julian HansenCommented:
The problem is your target is

/Pages/Modules/Assumptions/Test.aspx - that is the root of your request

You are including the Master template and then putting the reference to the javascript file relative to the Master instead of the Page.

To fix you need to change the inclusion of your javascript file in the Master to this

       <script type="text/JavaScript" src="../../../JavaScripts/collapseableDIV1.js"></script>

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SudhanshumAuthor Commented:
Thanks I will get back to you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.