Office Web Scripts - URL could be formed incorrectly on AJAX response

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6087 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mike Hatfield
2007-06-25 11:41:51 +00:00
parent 4417106b53
commit 7bde225592
3 changed files with 8 additions and 4 deletions

View File

@@ -169,7 +169,8 @@ var OfficeMyTasks =
if (successMessage != "") if (successMessage != "")
{ {
var json = "{\"statusString\":\"" + successMessage + "\",\"statusCode\":true}"; var json = "{\"statusString\":\"" + successMessage + "\",\"statusCode\":true}";
href += "&st=" + encodeURI(json); href += (href.indexOf("?") == -1) ? "?" : "&";
href += "st=" + encodeURI(json);
} }
window.location.href = href; window.location.href = href;
}, },
@@ -216,7 +217,8 @@ var OfficeMyTasks =
// Optionally add a status string // Optionally add a status string
if (textResponse != "") if (textResponse != "")
{ {
href += "&st=" + encodeURI(textResponse); href += (href.indexOf("?") == -1) ? "?" : "&";
href += "st=" + encodeURI(textResponse);
} }
window.location.href = href; window.location.href = href;
} }

View File

@@ -183,7 +183,8 @@ var OfficeNavigation =
// Optionally add a status string // Optionally add a status string
if (textResponse != "") if (textResponse != "")
{ {
href += "&st=" + encodeURI(textResponse); href += (href.indexOf("?") == -1) ? "?" : "&";
href += "st=" + encodeURI(textResponse);
} }
window.location.href = href; window.location.href = href;
} }

View File

@@ -112,7 +112,8 @@ var OfficeAddin =
// Optionally add a status string // Optionally add a status string
if (textResponse != "") if (textResponse != "")
{ {
href += "&st=" + encodeURI(textResponse); href += (href.indexOf("?") == -1) ? "?" : "&";
href += "st=" + encodeURI(textResponse);
} }
window.location.href = href; window.location.href = href;
} }