0

I am trying to filter a DVWP based upon a span tag value. The value is set in a document.ready function. Please show me how to send it the output of a DVWP. I tried to insert it where the $Rows variable is set in the DVWP, but could not do it without errors.

1 Answer 1

1

You can't use something which is set in document.ready (jQuery) to filter a DVWP. The DVWP is evaluated and rendered server-side, and the document.ready runs client-side. Hoever, you can do the filtering client-side with script if you have the superset of items in the DOM.

1
  • Hi Marc. I wrapped the entire DVWP inside a div tag. (<div id='filters'>) This hides the DVWP: var $fil = $('#filters'); $fil.hide(); Using a jquery filter function, I tried to effect certain items that meet the criteria. - $(fil).filter(function(index) { return $('@ID', this).val == 2; }).css('background-color', 'red');. Is there another element I can reference to see if the ID is equal to 2. Once I find a match, I'll want to hide that item. Thanks. – Richard70 0 secs ago
    – Anonymous
    Sep 24, 2010 at 15:32

Your Answer

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