:: Forum >> Version 2 >>

New pop up window link in a function

Another simple problem that i'm sure has an easy answer....
how do i set each link to open in a new window. the forums all talk about doing this with something similar to:
var link = new Active.Templates.Link;
link.setAttribute("target""_new");
 
But for some reason I can't make it implement when using a "function" rather than the above code? Every time I try to paste the above code into my example below it breaks.

Basically all i need is to open a link in a new window for each of the following columns...sorry again for the lack of programming knowledge...
//    COLUMN 14 LINK
    
var myLinks = function(columnrow){ 
        return 
"http://maps.google.com"
    } 

    
obj.setCellLink(myLinks14); 
    
obj.setCellTemplate(new AW.Templates.Link14);

        
//      COLUMN 15 LINK
    
var myLinks = function(columnrow){ 
        return 
"http://www.google.com";
    } 

    
obj.setCellLink(myLinks15); 
    
obj.setCellTemplate(new AW.Templates.Link15); 


    
//     COLUMN 16 LINK
    
var myLinks = function(columnrow){ 
        return 
"https://www.google.com"
    } 

    
obj.setCellLink(myLinks16); 
    
obj.setCellTemplate(new AW.Templates.Link16);

 
thank you in advance!!!

linkcrazy max
Tuesday, March 11, 2008
nevermind....

i added this to the end and it works fine.

obj.setAttribute("target", "_new");

so...

//     COLUMN 16 LINK
    
var myLinks = function(columnrow){ 
        return 
"https://www.google.com"
    } 

    
obj.setCellLink(myLinks16); 
    
obj.setCellTemplate(new AW.Templates.Link16); 
    
obj.setAttribute("target""_new");
 
linkcrazy max
Wednesday, March 12, 2008
actually, it's not working. i tested it offline and it works great then in ie and ff and no deal. now what? any other ideas out there?
am i missing some code?

obj.setAttribute("target", "_new");
linkcrazy
Wednesday, March 12, 2008
You should add 'target' attribute to the link template, not to the grid -

/javascript.forum.22203.1/new-popup-window-using-a.html
Alex (ActiveWidgets)
Thursday, March 13, 2008



This topic is archived.

Back to support forum

Forum search