How to pass this

This wont work


on (release) {
 var newW = 800;
 var newH = 400;
 getURL("javascript:restartScale(newW, newH, finalX, finalY);");
}


But this does


on (release) {
 getURL("javascript:restartScale(800, 400, finalX, finalY);");
}

I need those numbers to be dynamic