Hi,
I want to do call a popup javascript when click on a column data. Can I do it using $col["link"] = 'javascript: popup(id);' ?
Please advise. Thanks.
Regards,
Barry
Hello,
Yes this is doable. For e.g.
$col["link"] = 'javascript:window.open("http://www.google.com/?q={name}","newwind","height=500,width=800"); void(0);';
Latest build might be required, as it is recently fixed/added.
Hi,
The example not work. Below is my code. I just got the premium version.
$col["link"] = "javascript:window.open('google.com','new window','height=500,width=800'); void(0);";
It open blank page only. My firefox status bar show "javascript:window.open(" only. The url is not complete and get SyntaxError: syntax error @ javascript:window.open(:1
Please advise. Thanks.
Regards,
Barry
It works now but I have another issue.
I have one column that some row have data but some is null. Then the grid column display 'undefine' on the null row. The free version is showing empty instead of this. How to show blank instead of 'undefine'? Thanks.
I guess because I use the link. Code below for your reference.
$col = array();
$col["title"] = "Name";
$col["name"] = "name";
$col["width"] = "12";
$col["search"] = true;
$col["sortable"] = true;
$col["link"] = "detail.php?id={id}";
$col["linkoptions"] = "target='_blank'";
$cols[] = $col;