The various %nn tokens are characters encoded as hex. If you are going to encode them again, they must first be decoded. I'd try this:
Code:
window.open('encodeURI(<%=contextPath%>/do/OpenDocs/' + unescape(documentName) + '?method=openDocument&documentId=' + unescape(documentId)));
You can always see what URL is being produced by changing from window.open to alert:
Code:
alert('encodeURI(<%=contextPath%>/do/OpenDocs/' + unescape(documentName) + '?method=openDocument&documentId=' + unescape(documentId)));
If it doesn't look like a valid URL, further adjustment will be required.
Bookmarks