PDA

View Full Version : Passing cfusion variable into window.open url


dulatoag
12-11-2002, 03:16 PM
Hey:

I have an image that when clicked, I trigger a window.open script. The image is within a loop, and I want to pass a username to the window.open script. The username would be contained in a coldfusion variable:

onClick="openWindow(#username#)"

I want to pass that variable to the window that I open from the window.open script. But I'm having problems "converting" coldfusion variables into a js variable that I can use in the url:

window.open("lk_replacement.cfm?username=username"

Any help would make my day. Thanks.

dulatoag
12-11-2002, 03:56 PM
Forget it - I figured it out:

function openWindow(username) {
window.open(newwindow.cfm?username="+username

Works super. Hope this helps someone down the line!