NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on April 08, 2014, 07:40:16 AM

Title: NT8 OnClick in a Display field to link to a web page
Post by: Alberto on April 08, 2014, 07:40:16 AM
Hi,
The javascript Onclick check on the OnClick tab of a display field is allways disable then I cant do some like:

<a href="http://www.facebook.com/sharer" onclick="window.open(this.href, 'mywin',
'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;" >Share this</a>

This onclik command alow me to define the shape of the window and appears like a popup.

See image


[attachment deleted by admin]
Title: Re: NT8 OnClick in a Display field to link to a web page
Post by: Bruce on April 09, 2014, 01:21:24 AM
in the "text" field of the Display field put;

'<a href="http://www.facebook.com/sharer" onclick="window.open(this.href, ''mywin'',
''left=20,top=20,width=500,height=500,toolbar=1,resizable=0''); return false;" >Share this</a>'


all on one line. Then tick on "Allow xHTML" (because clearly it contains html) and tick on "Allow Unsafe xHTML" because it contains javascript (ie the onclick).

cheers
Bruce
Title: Re: NT8 OnClick in a Display field to link to a web page
Post by: Alberto on April 09, 2014, 02:38:44 AM
It works, thanks