Empty SPGetQueryString

Dec 9, 2011 at 2:55 PM

How can you evaluate if SPGetQueryString returns nothing or is empty before parsing the results?  Seem to be having a blonde moment here.

queryStringVals = $().SPServices.SPGetQueryString();
//what would go here to test, if (queryStringVals == "") { do something}
goTo = queryStringVals.SelectedID.toString();

Dec 9, 2011 at 3:01 PM

Blast it all, as soon as I post something I figure it out.

queryStringVals = $().SPServices.SPGetQueryString();

if (jQuery.isEmptyObject(queryStringVals))
  {
   //do something 
  }
else
  {
// do something else
  }

Hope it helps someone else.