pocobueno1388 Posted July 13, 2007 Share Posted July 13, 2007 I have this function: function showImage(id) { window.open( "inventory.php?itemID=id", "showImage", "status = 1, height = 350, width = 400, resizable = 0" ) } I am calling the function like so: <td onClick='showImage(1)'><a href="###">Link</a></td> But the "1" I am setting as the parameter for "id" is not working. It is supposed to pop up with the URL: inventory.php?itemID=1 Instead it is coming up with: [tt]inventory.php?itemID=id and not processing the "id" parameter as a variable. Here is the line that is obviously causing the problem: window.open( "inventory.php?itemID=id", "showImage", "status = 1, height = 350, width = 400, resizable = 0" ) Any help is greatly appreciated, thanks =D Quote Link to comment Share on other sites More sharing options...
xenophobia Posted July 13, 2007 Share Posted July 13, 2007 window.open( "inventory.php?itemID=id", "showImage", "status = 1, height = 350, width = 400, resizable = 0" ) Your first parameter having problems. Should be: window.open("inventory.php?itemID=" + id, ....); You had mixed up the variable inside the string. Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted July 13, 2007 Author Share Posted July 13, 2007 Ugh, I should have known that Thanks you very much. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.