user2329126
user2329126

Reputation: 1

Change querystring parameter

How is it supposed to be?

var text = $(this).siblings("[type=text]").val();
document.location = "Default.aspx" + "?id=" + text + "&type=" + query;

Upvotes: 0

Views: 57

Answers (1)

Ry-
Ry-

Reputation: 224859

The name of the property is window.location, not document.location. Also, you might want to escape one (or both) of those values using encodeURIComponent.

window.location = "Default.aspx" +
    "?id=" + encodeURIComponent(text) +
    "&type=" + encodeURIComponent(query);

Upvotes: 2

Related Questions