Quick Tip For Getting the View Name

Oct 30, 2010 at 12:16 AM

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();