Why don't you add "/" to your path and it will always work, wherever you are, on the same lever, below or upper ...
jQuery HowTo Resource - http://jquery-howto.blogspot.com On Sat, Jan 10, 2009 at 8:04 AM, Rick Faircloth <r...@whitestonemedia.com> wrote: > > 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 > >