I've got login templates that use jQuery and the path required depends on the ColdFusion template including the jQuery in the page.
For example: tb_show("Login", "login/login_form.cfm?height=320&width=290&modal=true", false); This code's path, "login/login_form.cfm", works when included from a directory above the "login" directory. But when it's included in a template that's in a directory that's on the same level as the login directory, that path won't work. In ColdFusion, as of version 8, we can create per-application logical mappings, such as the example below that works anywhere: (this.mappings, "/app_login", "e:\inetpub\webroot\fortstewart-sm\login") And I could just use td_show("Login", "/app_login/login_form.cfm etc...) and it would work when included in a template in any location in the tree. I was wondering if the same thing can be done with jQuery/Javascript or if there's another solution so I don't have to do this: <cfif cgi.script_name contains "index.cfm"> <td_show("Login", "login/login_form.cfm etc...); <cfelse> <td_show("Login", "../login/login_form.cfm etc...); </cfif> Rick