session variables can only be set on the server, a form only exists in HTML if you are not submitting the form then nothing is being sent to the server for you to store in any scope. Therefore you will either need to pass the current form field values between your windows using Javascript or you will need to use AJAX to store the current selection in session scope so that you can then access it on the new window.
Russ On Mon, Sep 19, 2011 at 4:10 PM, funand learning <funandlrnn...@gmail.com> wrote: > > @Russ. I am not sure I understand what you are saying. > > if my index.cfm is as follows: > > <cfset StructClear(session)> > > <form name="frm" method="post" action="results.cfm"> > <select name="dd_year"> > <option value="2000">2000</option> > <option value="2001">2001</option> > <option value="2002">2002</option> > <option value="2003">2003</option> > </select> > <input type="submit" value="Submit" name="sbtbutton" /> > </form> > The second page is as follows: > *results.cfm* > <cfset structappend(session,form)> > <cfdump var="#session#"> > <a href="onemorepage.cfm">Go to next page</a> > > *onemorepage.cfm* > <cfdump var="#session#"> > <a href="index.cfm">Go to search page</a> > > I have application.cfm too which has the following line: > > <CFAPPLICATION > NAME="myapp" > setclientcookies="Yes" > clientmanagement="Yes" > sessionmanagement="Yes" > sessiontimeout="#CreateTimeSpan(1,0,0,0)#" > applicationtimeout="#CreateTimeSpan(1,0,0,0)#"> > > so now the user is on 'onemorepage.cfm' and from here he opens a new window > using 'ctrl + N'. On new window he clicks on 'Go to search page' link, and > then select a dfferent tax year. Now, I want the old window to show the old > tax year for all pages, and new window to show new tax year for all pages. > > I tested using both session/client. The problem is If I select a different > tax year on new window, and then refresh the old window, the old > window shows the new value > > I hope I am clear. > > > On Mon, Sep 19, 2011 at 10:23 AM, <> wrote: > >> >> >>C'Mon Claude, store a 4 character value to the db >> >> If the Tax year is the ONLY information needed, then a cookie may be used. >> But in my mind, there are often more informations to store about the user, >> like his name, eMail, address, etc. Then the database approach is better. >> >> >> >> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:347520 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm