How to craete a popup

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
Thomas

How to craete a popup

Post 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
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Re: How to craete a popup

Post 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
Thomas

How to craete a popup

Post by Thomas »

Thanks a lot for your really fast help.

yes, it works fine for me :D
Locked

Return to “[locked] Installation, Setup and Upgrade”