
victorlm
New User
Aug 13, 2009, 3:36 AM
Post #1 of 1
(3306 views)
|
Problem Passing CGI parameters to a Pop-up Window
|
Can't Post
|
|
Hello I have a perl cgi that calls another cgi to show it in a javascript pop up window passing a paramenter. The call to the popup is in a html tag<a> and i have this tag within a loop to print different links calling the pop up with a different values for the parameter . My problem is when all the links are printed and I click on one of them, the value passed to the popup is always the last value. However if instead of showing the link in a pop up window i show it in another tab, gets the right value. I've attached the code below: foreach my $pattern(@patterns){ <script language='JavaScript'> function newPopup(){ window.open('displayKB.cgi?id=$pattern', '', 'width=225,height=200,left=900'); } </script> <a href='javascript:newPopup()'> LINK </a> } Any suggestion? Thanks
|