I have a popup window that takes a string as a parameter. I pass this parameter on the URL. The string contains a "+" character and it is being stripped when I read it via Request.QueryString from the popup page. server.URLEncode encodes the "+" to "%2B" and the querystring should convert it back. The problem I'm having is strURL gets translated back to containing the + char when it reaches openWindow. Does anybody know how I can solve this problem?
<tt>
strURL = "Page.asp?TestName=" & server.URLEncode (adoRsTests.Fields("Metric")
Response.Write "<a href=""javascriptpenWindow('" & strURL & "','" & strWinFeatures & "')"">link</a>"
Here is the Javascript function:
function openWindow( windowURL, windowFeatures ) {
//if window exists close it
if (popUpWindow) {
popUpWindow.close();
popUpWindow = null;
}
popUpWindow = window.open(windowURL, "popUpWindow", windowFeatures );
popUpWindow.focus();
}
</tt>
<tt>
strURL = "Page.asp?TestName=" & server.URLEncode (adoRsTests.Fields("Metric")
Response.Write "<a href=""javascriptpenWindow('" & strURL & "','" & strWinFeatures & "')"">link</a>"
Here is the Javascript function:
function openWindow( windowURL, windowFeatures ) {
//if window exists close it
if (popUpWindow) {
popUpWindow.close();
popUpWindow = null;
}
popUpWindow = window.open(windowURL, "popUpWindow", windowFeatures );
popUpWindow.focus();
}
</tt>