Cold Fusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingCold Fusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 23rd, 2011, 03:53 PM
Carjunkie Carjunkie is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2011
Posts: 1 Carjunkie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 29 sec
Reputation Power: 0
Set session variable in Iframe to be used in parent

Do anyone know of a way to update a coldfusion session variable in a iframe?

I have sessionmanagement="true" and I would like to run a iframe that updates a session variable based on a select statement for the year of a vehicle.

When I run the iframe the the session variable is passed as a url variable and this appears to works with out a hitch. In the frame page I am setting the session variable from the url variable passed to the iframe, however when the page returns to the parent the the session is not set ??

I am trying to make a "year make model" utility so that I can include it anywhere on my auto parts site oehq.com where the user can reset the vehicle ID to a new "year make model".


Thanks for the help



Sample Code:

<!---html select statement with iframe call--->
<tr>
<td class="reg" align="left">&nbsp;&nbsp;&nbsp;<strong>Year</strong></td>
<td>

<cfoutput>
<select name="gYEARID" onchange="window.open(this.options[this.selectedIndex].value,'myIFrame')" >

<cfif session.sYear eq 0>
<option value="">-- Select Year --</option>
</cfif>

<cfloop query="getyear">
<cfif #session.sYear# eq #trim(getyear.autoyear)# >
<option value="getymm.cfm?gyear=#trim(getyear.autoyear)#"selected>#autoyear#</option>
<cfelse>
<option value="getymm.cfm?gyear=#trim(getyear.autoyear)#" >#autoyear#</option>
</cfif>
</cfloop>

</select>
</cfoutput>

<iframe src="getymm.cfm?gyear=0" name="myIFrame" id="value" width="800" height="300">
You can't see this because your browser does not support iframes.
</iframe>

<cfoutput><h1> session.syear = #session.syear#</h1> </cfoutput>
</td>
</tr>



<!--- iframe page = getymm.cfm--->
<cfparam name="url.gyear" default="0">
<cfset session.syear = #url.gyear#>
<cfdump var="#url#">
<cfflush>
<cfoutput>
session.syear = #session.syear# <br>
</cfoutput>

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingCold Fusion Development > Set session variable in Iframe to be used in parent


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap