Quick Tip For Getting the View Name

Oct 29, 2010 at 11:16 PM

I posted this on my blog earlier but since I am using SPServices to perform a printing function I thought I would add this here as well.

If you have a listview on a page for a list that has multiple views, you can use the following piece of jQuery to get the text value of the view selector dropdown

var viewname = $("td[id*='onetViewSelector']").text();