Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing #SESSION.URLTOKEN# into frames

Status
Not open for further replies.

aleci

Programmer
May 22, 2001
40
GB
Hi all,
Im trying to pass the #SESSION.URLTOKEN# variable into a template, left.cfm, through a frameset.
The reason i am doing this is to test the case where a user may have cookies disabled.
The frames are set on my index.cfm page which contains the following:

<FRAME name=&quot;left&quot; src=&quot;left.cfm?session.URLTOKEN#&quot;>

This doesnt seem to work; the session variable never reaches this frame.
Does anybody have any ideas?
Thanks in advance.
 
it does not work because you did not enclose variable within # signs:
your line:
<FRAME name=&quot;left&quot; src=&quot;left.cfm?session.URLTOKEN#&quot;>
correctted:
<FRAME name=&quot;left&quot; src=&quot;left.cfm?#session.URLTOKEN#&quot;>

but aside that, you shouldn't use session variables without locking them first; to do that, at the top of the index.cfm template use this:

<cflock name=&quot;#session.sessionID#&quot; timeout=&quot;30&quot; type=&quot;readonly&quot;>
<cfset variables.URLToken= session.URLToken>
</cflock>

and then:

<FRAME name=&quot;left&quot; src=&quot;left.cfm?#variables.URLToken#&quot;>


:) Sylvano
dsylvano@hotmail.com
 
one more thing: have you included the cfoutput tags?

<FRAME name=&quot;left&quot; src=&quot;left.cfm?<cfoutput>#variables.URLToken#</cfoutput>&quot;> Sylvano
dsylvano@hotmail.com
 
I'm having a similar problem. I've enabled session management in the CF Administrator. I've set my application name, set clientcookies=no and sessionmanagement=yes in my Application.cfm. The coding in my form file is:
<cfif (NOT IsDefined(&quot;SESSION.AddServer&quot;))>
<!-- If structure is not defined, create/initialize it -->
<cfset SESSION.AddServer = StructNew()>
followed by the session variables and then the HTML <body> followed by:
<cfform
ACTION=&quot;AddServer.cfm?#SESSION.URLToken#&quot;
METHOD=&quot;POST&quot;>
I get back an &quot;element URLToken not defined&quot; error message.
Any hints? According to the book I have, you don't need the <cfoutput> tags if you're within <cfform>. Yes?

Thanks,
Carol
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top