2

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?

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.