Function

$().SPServices.SPGetQueryString

Certification

Certified for SharePoint 2007 Certified for SharePoint 2010

Functionality

The SPGetQueryString function parses out the parameters on the Query String and makes them available for further use. This function was previously included, but was a private function.

Syntax

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

The Query String parameter values can then be accessed by name reference:

var thisSource = queryStringVals["Source"];
or
var thisSource = queryStringVals.Source;

Example

In this example, lastID will be assigned the value of the ID Query String parameter. So if the URL is:
http://servername/sitename/Lists/MyList/NewForm.aspx?ID=10
lastID will be assigned the value 10.

var queryStringVals = $().SPServices.SPGetQueryString();
var lastID = queryStringVals["ID"];

Last edited Aug 4, 2011 at 11:58 AM by sympmarc, version 7

Comments

No comments yet.