Hi everybody,
My problem seems pretty basic, hopefully someone will find a few minutes to look at it. My simplified application screen is built of three frames. In one of them (controlFrame.cfm) there is a form having a textbox input control - TXBPTNO - (where a user can enter some number) and a submit button. In the other two frames (dataFrame.cfm and graphFrame.cfm) the entered number should appear when the button is pressed.
The frameset is determined in the index.cfm template. I've also created the application.cfm template where I declare a var 'application.pt_no' via which I want to communicate with dataFrame.cfm and graphFrame.cfm from controlFrame.cfm. That means the entered number should go into this var and then this new value is to appear in the 'data' and 'graph' frames.
So far I didn't succeed in this, for example my attempt to set the new value with <cfset Application.pt_no=#txbPtNo#> (in the controlFrame.cfm) gives me an error message: 'Variable TXBPTNO is undefined'.
Here I put code of all the templates.
application.cfm code:
index.cfm code
controlFrame.cfm code
dataFrame.cfm code
graphFrame.cfm code
Can anyone help me with the mess?
Thanks,
Alex
My problem seems pretty basic, hopefully someone will find a few minutes to look at it. My simplified application screen is built of three frames. In one of them (controlFrame.cfm) there is a form having a textbox input control - TXBPTNO - (where a user can enter some number) and a submit button. In the other two frames (dataFrame.cfm and graphFrame.cfm) the entered number should appear when the button is pressed.
The frameset is determined in the index.cfm template. I've also created the application.cfm template where I declare a var 'application.pt_no' via which I want to communicate with dataFrame.cfm and graphFrame.cfm from controlFrame.cfm. That means the entered number should go into this var and then this new value is to appear in the 'data' and 'graph' frames.
So far I didn't succeed in this, for example my attempt to set the new value with <cfset Application.pt_no=#txbPtNo#> (in the controlFrame.cfm) gives me an error message: 'Variable TXBPTNO is undefined'.
Here I put code of all the templates.
application.cfm code:
Code:
<cfapplication name="prj_test2"
ClientManagement="No"
SessionManagement="Yes"
SessionTimeout="#CreateTimeSpan(0,0,10,0)#"
ApplicationTimeout = #CreateTimeSpan(0,0,10,0)#
SetClientCookies="Yes">
<CFLOCK SCOPE="Application" TIMEOUT="30" TYPE="Exclusive">
<CFIF NOT IsDefined("Application.pt_no")>
<CFSET application.pt_no = 0>
</CFIF>
</CFLOCK>
index.cfm code
Code:
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head>
</head>
<frameset cols="50%,*">
<frame src="dataFrame.cfm" name="dataFrame" id="dataFrame" title="dataFrame" />
<frameset rows="50%,*">
<frame src="graphFrame.cfm" name="graphFrame" id="graphFrame" title="graphFrame" />
<frame src="controlFrame.cfm" name="controlFrame" id="controlFrame" title="controlFrame" />
</frameset>
</frameset>
<noframes>
<body>
</body>
</noframes>
</html>
controlFrame.cfm code
Code:
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head>
</head>
<body>
<cfform action="index.cfm" method="post" target="_top">
<p>Number: <cfinput name="txbPtNo" type="text" value="#Application.pt_no#" />
<!---cfset Application.pt_no=#txbPtNo#--->
<cfinput name="btn_GetData" type="submit" value="GetData" />
</cfform>
</body>
</html>
dataFrame.cfm code
Code:
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head>
</head>
<body>
<cfoutput>
In dataFrame pt_no=#application.pt_no#
</cfoutput>
</body>
</html>
graphFrame.cfm code
Code:
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head>
</head>
<body>
<cfoutput>
In graphFrame pt_no=#application.pt_no#
</cfoutput>
</body>
</html>
Can anyone help me with the mess?
Thanks,
Alex