Coldfusion.navigate and url variables

Like me, you might want to use URL variables in the URL parameter in your Coldfusion.navigate() calls

Here's what I had:

ColdFusion.navigate("window.drawings.cfm?projectID=" + projectId,'drawingsWindow',mycallBack,myerrorhandler);

However the page that was being called insisted (with a familiar CF error) that there was no projectID in the URL scope.

Ok - "When in trouble Google is your friend". So I came upon a blog post by Raymond Camden, and while he did not discuss this problem I saw that he used an escape() on his url variables.

So I changed my code to this - which is working as desired:

ColdFusion.navigate("window.drawings.cfm?projectID=" + escape(projectId),'drawingsWindow',mycallBack,myerrorhandler);

Comments