View Column calling a Javascript Function

HiIt is a Web Application

I have a function on the $$ViewTemplate of a particular view and i am trying to call that function on the view column but i am not able to do that.

The code in the js header is as follow:

function poptastic(url)

{

newwindow=window.open(url,'name','height=400,width=200');

//if (window.focus) {newwindow.focus()}

}

Basically the function above will help me to open the link into the new window.

The code on the view column is as below:

db := @ReplaceSubstring( @Subset( @DbName; -1); “\”; “/” );

mt:= " target=‘Main’ ";

gogo:="?OpenDocument&AutoFramed&dr=no’’ " ;

df:=“/”+db+“/(vDraft)/”+@Text(@DocumentUniqueID)+ gogo + mt;

where i want to call this function how will i modified the code for the same.

 <a href=+'”+df + “>”+@Text(@Modified) +“

Subject: View Column calling a Javascript Function

Try this:

db := @WebDbName;

view:=“(vDraft)”;

unid:=@Text(@DocumentUniqueID);

href:=“<a href="JavaScript: void poptastic('/”+db+“/”+view+“/”+unid+“?OpenDocument&AutoFramed&dr=no&target=main’);">”;

<td width="5px"> <td width="200px">”+href+@Text(@Modified) +“

HTH

Sai

Subject: RE: View Column calling a Javascript Function

thanks for your help

Subject: View Column calling a Javascript Function

Hi Sameer,

This should do it:

db := @webdbname;

gogo:=“?OpenDocument&AutoFramed&dr=no” ;

url:=“/”+db+“/(vDraft)/”+@Text(@DocumentUniqueID)+ gogo;

<td width="5"> <td width="200"><a href="javascript:poptastic('”+url + “')">”+@Text(@Modified) +“”

Note that I also changed the 1st line. @webdbname is a new function in R6 and returns the name of the current database encoded for URL inclusion.

Regards,

René

Subject: RE: View Column calling a Javascript Function

Thanks Rene for your help