views:

402

answers:

1

Hi,

When i click on a Ajax.ActionLink, which displays a partial view, why does none of the javascritp associated with the partial view fire? This previously all worked before when I used Html.ActionLink. I have a series of scripts referenced in master page, which include $document.Ready functions. I have also tried added the script into the partial views themselves but they still don't fire. Any ideas?

Thank you

+1  A: 

javascript code dynamicly loaded into a div doesnt get recognised as executable code.

put the code in a function in a sepperate .js file, load this in your site.master and start executing by adding the

new AjaxOptions { oncomplete="myJavascriptFunction" }

to your Ajax.Actionlink

ArjanW