> Can I do this?
> <cfif NOT IsDefined('session.client_id')>
> <cflocation url="javascript:popUpb('home_login.cfm')">
> <cfabort>
> </cfif>
> It doesn't work though!
> Don't worry - I have a function in my head tags within my top element
> page.
Mmmmm... nope, I wouldn't expect that to work and here's why:
<cflocation> actually is a shortcut for a particular <cfheader> tag, so it
redirects to the next page by manipulating the http header information for
the current request. There is however no communication ( that I'm aware of )
between the http headers for a given request and javascript on the page...
So, the way to get this to work the way you would like it to is to eliminate
the <cflocation> and use a slightly different syntax.
<cfif NOT IsDefined('session.client_id')>
<script language="javascript">
popUpb('home_login.cfm');
</script>
<cfabort>
</cfif>
I won't get into specifics about how this technically ought to be inside the
<head> tags or how it's probably better to associate it with the
window.onload event either in the body tag or by setting the event to your
function... this syntax should work for all intents and purposes on most
browsers.
hth
Isaac Dealey
Certified Advanced ColdFusion 5 Developer
www.turnkey.to
954-776-0046
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists