Search code examples
javascriptajaxmaster-pagesservicecontract

Calling a content page's javascript from a master pages javascript


I am working on a web app that can display data in two drastically different formats. To do this, I am using a master page with two different content pages for the differing views. I am using .svc files to do AJAX style server requests. I would like to be able to do a service call from the master pages javascript, then run the appropriate onSuccess javascript method (which would ideally lie in another .js file) to display the data based on which content page I am in. I am guessing this would be done with some kind of function delegate, but I am new to web development and not sure how to do this. Any help would be greatly appreciated.


Solution

  • This was a stupid question... Just attach different js files to the content pages. Give the functions the same name and it works fine.