Page 1 of 1

How to craete a popup

Posted: Wed Sep 15, 2004 10:25 am
by Thomas
Hello,

i try to create a popup window with Javascript. I have tryed it in two ways but nothing works.

The first Way was to crate a own template and insert the following between the tags:





anfd call it via:

Fenster anzeigen

In the second way i tryed to insert the headerdata in the speacial headarea of the content editing page.

When i let me schow the sourcecode of the generated page i only see the output of the funktion not the aditional datas.

Is there any way how to create a popup window inside the CMS?

Thanks a lot for helping,
Thomas

Re: How to craete a popup

Posted: Wed Sep 15, 2004 10:40 am
by Ted
Thomas wrote:Hello,


i try to create a popup window with Javascript. I have tryed it in two ways but nothing works.

The first Way was to crate a own template and insert the following between the tags:





anfd call it via:

Fenster anzeigen

In the second way i tryed to insert the headerdata in the speacial headarea of the content editing page.

When i let me schow the sourcecode of the generated page i only see the output of the funktion not the aditional datas.

Is there any way how to create a popup window inside the CMS?

Thanks a lot for helping,
Thomas
Hello.

Well, this truely is our first real FAQ question. I need to actually add it.

Anyways, in order to call javascript in CMS, you need to wrap it in {literal}{/literal} tags. The problem is that Smarty sees the { and } and tries to render them with it's own system. Putting the literal around it forces Smarty to ignore it.

Code: Select all

{literal}<__script__ language="javascript">print "foo";</__script>{/literal}
Hope that helps!
wishy

How to craete a popup

Posted: Wed Sep 15, 2004 11:19 am
by Thomas
Thanks a lot for your really fast help.

yes, it works fine for me :D