SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The jQuery scripts I have in a DVWP do not get executed when I enable Asychronous Load in the Ajax Options of the DVWP. They do execute when I disable Asychronous Load though. Any thoughts on this?

A few scripts I refer to in the XSLT of the DVWP are:

<!-- Table sorting JS -->
<script type="text/javascript" src="/_layouts/somefolder/jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="/_layouts/somefolder/fancybox/jquery.fancybox-1.3.1.js"></script>
<link rel="stylesheet" type="text/css" href="/_layouts/somefolder/fancybox/jquery.fancybox-1.3.1.css" media="screen" />
<link rel="stylesheet" href="/_layouts/somefolder/jquery.simplemenu.css" type="text/css" media="screen" />
share|improve this question

Try using the "defer"="defer" attribute in your script tags.

share|improve this answer

I see you're referencing jquery plugins, but where is your Jquery Library Reference?

Jquery Plugins will fail if the Library is not loaded before them. Cheers

share|improve this answer

Do they truly not execute or does it not give you the behaviour you were expecting?

Most likely your jQuery scripts run before your async data is loaded on the page. When the data arrives on the page, it will not be affected by the jQuery script that has already finished running.

share|improve this answer

I am guessing you are using your jQuery in the document ready function.

You need to wrap your code in a function and add it to the built in SharePoint functions which are called after async postbacks:



share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.