Quantcast
Viewing all articles
Browse latest Browse all 6517

New Post: How to call UpdateListItems from Link

To make the code cleaner and more efficient, you shouldn't create a function and click handler for every item. What you should do is what you are already thinking; Add attributes to the <a> tag and with your 1 click handler, pick those attributes up on the fly and use them within your 1 function call.

I've created a fiddle, so you can, well fiddle around with that idea:
http://jsfiddle.net/iOnline247/eFqLB/

So to fit this within your DVWP, you will get rid of the logic of adding script for every row. Add logic to generate the attributes that are needed for each <a> within your XSLT, and finally within your XSLT after the row iteration, add a simple <script> block with the code from the fiddle. You'll need to tweak the script accordingly though.

Cheers,
Matthew

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>