3.2.0

A common question, however, no good solution found in this forum : How to pass dynamic parameters to child window's URL

I use the following code to open a new window by double click on the grid row. It works fine.

var row = new Active.Templates.Row;
row.setEvent("ondblclick", function(){this.action("myAction")});
obj.setTemplate("row", row);

obj.setAction("myAction", testfunction);

function testfunction (src){
var index = src.getProperty("selection/index");
var col1 = obj.getProperty("data/text", index, 1);
var col2= obj.getProperty("data/text", index, 2);
window.open("my_test.php?select1=col1&select2=col2, "message"); }

i can get the col1 and col2 as the values for the first two cells value in the first two column in each row. However, when i incorporate the above code to the actural php code as in the following, I cannot get the thing work.

$html .= " function selectionchangeFunction(src){var index = src.getProperty(\"selection/index\");
var col1 = $name.getProperty(\"data/text\", index, 1);
var col2 = $name.getProperty(\"data/text\", index, 2); window.open(\"my_test.php?select1=col1&select2=col2\", \"message\"); } \n";

when i click on the particular row, I have the url as follows:

my_test.php?select1=col1&select2=col2

Here col1 and col2 are displayed as exactly "col1" and "col2' instead of the value from the cells.

This problem is described more clearly in a previous post:

" However, I cannot find a way to pass dynamic parameters to the child window URL (my_test.php?);
The dynamic parameters should be the first column data (IBM, Microsoft, Dell ...). What I want is:
When I double click 1st row, the child window URL shall be
my_test.php?IBM; and double click 2nd row, the child window URL shall be my_test.php?Microsoft .... "

does any one know how to solve this very common problem? I have saw several posts to the similar problem, however, no good solution. I think it is important to find an answer to it. Please share your experience with us.

Thanks a lot in advance!
absolutely newbie
April 12,
Hi, All,
I think i get the solution by myself. So I post it here for your reference:

What I did is:

$html .= " function selectionchangeFunction(src){var index = src.getProperty(\"selection/index\");
var col1 = $name.getProperty(\"data/text\", index, 1);
var col2 = $name.getProperty(\"data/text\", index, 2); window.open(\"my_test.php?select1=\"+$name.getProperty(\"data/text\", index, 1)+\"&select2=\"+$name.getProperty(\"data/text\", index, 2), \"message\"); } \n";

it works!

best!
absolutely newbie
April 12,

should be :


$html .= " function selectionchangeFunction(src){var index = src.getProperty(\"selection/index\");
window.open(\"my_test.php?select1=\"+$name.getProperty(\"data/text\", index, 1)+\"&select2=\"+$name.getProperty(\"data/text\", index, 2), \"message\"); } \n";


best!
absolutely newbie
April 12,
i cant get into forum cause of block on line 184 what does this mean
December 24,

This topic is archived.

See also:


Back to support forum