Re: [SMARTY] Help using the popup block

From: Date: Wed, 11 Dec 2002 18:32:53 +0000
Subject: Re: [SMARTY] Help using the popup block
References: 1 2  Groups: php.smarty.dev php.smarty.general 
Request: Send a blank email to php-smarty-dev+get-405@lists.php.net to get a copy of this message
Sure it is, You can test it (Note that I replaced what popup does for a direct result) <a onClick='return overlib("<a href=\'javascript:alert();\'></a>",STICKY,CAPTION,"foo")'>foo</a> The problem is that I'm absolutely lost between string quotations and can't pass parameters to the javascript function, If I want to pass alert('foo') what do I have to use? Someone should be able to heeeelp me :-) Thanks again ----- Original Message ----- From: "Monte Ohrt" <monte@ispi.net> To: <garland_foster@salutia.com> Cc: <smarty-general@lists.php.net>; <smarty-dev@lists.php.net> Sent: Wednesday, December 11, 2002 11:52 AM Subject: Re: [SMARTY] Help using the popup block > Is it even feasible to put javascript in a window created with > javascript? This might not even be an escapement issue. On another note, > I did commit some changes to the popup function so you can safely pass > text with newlines in it. > > Monte > > On Tue, 2002-12-10 at 22:10, garland_foster@salutia.com wrote: > > I'm using {popup} to display a tooltip that can be used to display > > a list of options to the user. > > I know that you can include links on popus carefully escaping quotes > > > > {popup text="<a href=\'foo.html\'>a link</a>"} > > > > The problem is that I need the link to execute a javascript function > > on the form > > javascript:foo('bar','hey','hello'); > > And couldn't found a combination of quotes to include the JS code insde a > > link on the popup: > > > > {popup text="<a > > href=\'javascript:foo(\'a\',\'b\');\'>a link</a>"} > > Doesn't work I guess because the quotes for href are the same than the quotes > > and > > {popup text="<a > > href=\'javascript:foo(\"a\",\"b\");\'>a link</a>"} > > or > > {popup text="<a > > href=\"javascript:foo(\'a\',\'b\');\">a link</a>"} > > arent't working either. > > > > If you have experience using popup I'll appreciate some help. > > > > Garland > > > > > > for the Js parameters > > > -- > Monte Ohrt <monte@ispi.net> > >

« previous php.smarty.dev (#405) next »