Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

Embedding Javascipt in CityDesk

Could anyone out there advise me on how to incorporate a javascript file in CityDesk. If I create a new folder within the CityDesk work environment, name this "javascript" and populate this folder with some javacript files, how do I go about referencing these files within a Template or Variable?

For example, if I embed the following call within a template:

<SCRIPT LANGUAGE="JavaScript1.2"

how do I get CityDesk to reference the correct script file, and include the script file into the site like an image or a article or whatever.

Dion Weston
Friday, February 14, 2003

Found it. Thank you Darren Collins.

For those who didn't know you emdeb a "Magic name".

"You can get the Magic Name by right-clicking on the article in the CityDesk main window, and selecting Copy Magic Name. Then highlight PTMFOGXXX, right-click, and select paste."

Dion Weston
Friday, February 14, 2003

and the best tip I can give you for using javascript to extend cityscript:

populate a javascript array with CD {$foreach ...$}
Watch out though that you'll need absolute links. Relative links will be evaluated relative to the document using the javascript (which is ok if the javascript is part of the page, but not if you use an external .js file)

Adriaan van den Brand
Monday, February 17, 2003

*  Recent Topics

*  Fog Creek Home