If you really wanted JS to have those though, you could put <script>var CGI = #serializeJSON(CGI)#;</script> in your cfm's output.
On Thu, Sep 29, 2011 at 12:50 PM, Judah McAuley <[email protected]>wrote: > > Not natively that I'm aware of, however, it is easy to deal with. > > <script> > <cfoutput> > var referer = #cgi.http_referer#; > </cfoutput> > referer = referer.slice('/').pop(); > if ( referer == 'index.cfm' ) > etc > > </script> > > > On Thu, Sep 29, 2011 at 10:30 AM, Rick Faircloth > <[email protected]> wrote: > > > > Ok... I'm tired of searching. > > > > Can JS read CGI variables? > > > > e.g. > > > > var referer = cgi.http_referer.slice('/').pop(); > > > > if ( referer === 'index.cfm' ) > > > > etc. > > > > Rick > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347804 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

