From https://spservices.codeplex.com/discussions/447740
I tried upgrading to SPServices 2013.01 from 0.7.1a. I noticed my SPRedirectWithID quit functioning. I looked at the source and noticed that the final line of the function has changed.
Line 2711:
```
location.href = thisRedirectUrl +
(thisRedirectUrl.indexOf("?") > 0) ? "&" : "?" +
opt.qsParamName + "=" + lastID +
((typeof queryStringVals.RealSource === "string") ? ("&Source=" + queryStringVals.RealSource) : "");
```
Notice is starts with thisRedirectUrl then appends it based on conditions. In my case, my original _thisRedirectUrl_ up to that point is "../../pages/NewTORedirect.aspx" and when line 2711 runs, _location.href_ results in "&"
I ran a simple test as...
```
var thisRedirectUrl = "../../pages/NewTORedirect.aspx";
var strLocation = thisRedirectUrl + (thisRedirectUrl.indexOf("?") > 0) ? "&" : "?TOID=598";
console.log(strLocation );
```
Reasonably, you would expect my output to be...
"../../pages/NewTORedirect.aspx?TOID=598"
but instead, I get...
"&"
I then ran the test as...
```
var thisRedirectUrl = "../../pages/NewTORedirect.aspx";
var strLocation = (thisRedirectUrl.indexOf("?") > 0) ? "&" : "?TOID=598";
console.log(strLocation );
```
Notice, I'm not appending _thisRedirectUrl_ this time. My output was (correctly)...
"?TOID=598"
I'm running IE8, MOSS 2007, SPServices 2013.01, and jQuery 1.8.3. Is there something wrong with the syntax in line 2711 that I'm missing?
Comments: Fixed in https://spservices.codeplex.com/workitem/10162
I tried upgrading to SPServices 2013.01 from 0.7.1a. I noticed my SPRedirectWithID quit functioning. I looked at the source and noticed that the final line of the function has changed.
Line 2711:
```
location.href = thisRedirectUrl +
(thisRedirectUrl.indexOf("?") > 0) ? "&" : "?" +
opt.qsParamName + "=" + lastID +
((typeof queryStringVals.RealSource === "string") ? ("&Source=" + queryStringVals.RealSource) : "");
```
Notice is starts with thisRedirectUrl then appends it based on conditions. In my case, my original _thisRedirectUrl_ up to that point is "../../pages/NewTORedirect.aspx" and when line 2711 runs, _location.href_ results in "&"
I ran a simple test as...
```
var thisRedirectUrl = "../../pages/NewTORedirect.aspx";
var strLocation = thisRedirectUrl + (thisRedirectUrl.indexOf("?") > 0) ? "&" : "?TOID=598";
console.log(strLocation );
```
Reasonably, you would expect my output to be...
"../../pages/NewTORedirect.aspx?TOID=598"
but instead, I get...
"&"
I then ran the test as...
```
var thisRedirectUrl = "../../pages/NewTORedirect.aspx";
var strLocation = (thisRedirectUrl.indexOf("?") > 0) ? "&" : "?TOID=598";
console.log(strLocation );
```
Notice, I'm not appending _thisRedirectUrl_ this time. My output was (correctly)...
"?TOID=598"
I'm running IE8, MOSS 2007, SPServices 2013.01, and jQuery 1.8.3. Is there something wrong with the syntax in line 2711 that I'm missing?
Comments: Fixed in https://spservices.codeplex.com/workitem/10162