By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,664 Members | 1,623 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,664 IT Pros & Developers. It's quick & easy.

session variable and TDC control

P: n/a
In some code I inherited there is use of the TDC control to display
table data. In trying to fix a problem, I put a couple of session
variables into the module that is specified by the DataURL property of
the TDC control. Call this module data.php. Call the page that I am on
page.php.

The two session variables are:
1 - $_SESSION['totcost'] = $totcost; where $totcost is what I
actually want
2 - $_SESSION['trace'] = $current_file . '<br>' . $_SESSION['trace'];

and I display these in page.php.

What I am finding is that for repeated invocations of data.php, none
show up in $_SESSION['trace'] until I leave page.php and then come back.
At that time, all the invocations of data.php appear in the stack.

Also, the value for $_SESSION['totcost'] does not show up in page.php
until I leave and come back in. It retains that value, even for a
change in that value, until I leave and come back in.

I suspect there is something of an asynchronous nature going on. My
question, the answer to which would solve my problem, is how can I get
the value of $totcost from data.php immediately into page.php?
Aug 31 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a

<sheldonlgwrote in message
news:f_******************************@giganews.com ...
In some code I inherited there is use of the TDC control to display table
data. In trying to fix a problem, I put a couple of session variables
into the module that is specified by the DataURL property of the TDC
control. Call this module data.php. Call the page that I am on page.php.

The two session variables are:
1 - $_SESSION['totcost'] = $totcost; where $totcost is what I actually
want
2 - $_SESSION['trace'] = $current_file . '<br>' . $_SESSION['trace'];

and I display these in page.php.

What I am finding is that for repeated invocations of data.php, none show
up in $_SESSION['trace'] until I leave page.php and then come back. At
that time, all the invocations of data.php appear in the stack.

Also, the value for $_SESSION['totcost'] does not show up in page.php
until I leave and come back in. It retains that value, even for a change
in that value, until I leave and come back in.

I suspect there is something of an asynchronous nature going on. My
question, the answer to which would solve my problem, is how can I get the
value of $totcost from data.php immediately into page.php?
would a header call to reload page.php in the appropriate spot be
applicable? the only other alternative that i can think of off-hand other
than refreshing the tdc data...it's probably caching it...is to tie a js
function in to do the calculation during the appropriate activity.
Aug 31 '08 #2

P: n/a
Dale wrote:
<sheldonlgwrote in message
news:f_******************************@giganews.com ...
>In some code I inherited there is use of the TDC control to display table
data. In trying to fix a problem, I put a couple of session variables
into the module that is specified by the DataURL property of the TDC
control. Call this module data.php. Call the page that I am on page.php.

The two session variables are:
1 - $_SESSION['totcost'] = $totcost; where $totcost is what I actually
want
2 - $_SESSION['trace'] = $current_file . '<br>' . $_SESSION['trace'];

and I display these in page.php.

What I am finding is that for repeated invocations of data.php, none show
up in $_SESSION['trace'] until I leave page.php and then come back. At
that time, all the invocations of data.php appear in the stack.

Also, the value for $_SESSION['totcost'] does not show up in page.php
until I leave and come back in. It retains that value, even for a change
in that value, until I leave and come back in.

I suspect there is something of an asynchronous nature going on. My
question, the answer to which would solve my problem, is how can I get the
value of $totcost from data.php immediately into page.php?

would a header call to reload page.php in the appropriate spot be
applicable? the only other alternative that i can think of off-hand other
than refreshing the tdc data...it's probably caching it...is to tie a js
function in to do the calculation during the appropriate activity.
That was the bug I was trying to fix. While the table displays
correctly after a sort, the calculation remembers the first record (and
only that one) as being the original. Therefore, the js function
calculates the wrong totcost. If I can pass the info during the **
build** of the table back to the caller (say, by $_SESSION), then I can
bypass that bug.
Aug 31 '08 #3

P: n/a

<sheldonlgwrote in message
news:Zs******************************@giganews.com ...
Dale wrote:
><sheldonlgwrote in message
news:f_******************************@giganews.co m...
>>In some code I inherited there is use of the TDC control to display
table data. In trying to fix a problem, I put a couple of session
variables into the module that is specified by the DataURL property of
the TDC control. Call this module data.php. Call the page that I am on
page.php.

The two session variables are:
1 - $_SESSION['totcost'] = $totcost; where $totcost is what I
actually want
2 - $_SESSION['trace'] = $current_file . '<br>' . $_SESSION['trace'];

and I display these in page.php.

What I am finding is that for repeated invocations of data.php, none
show up in $_SESSION['trace'] until I leave page.php and then come back.
At that time, all the invocations of data.php appear in the stack.

Also, the value for $_SESSION['totcost'] does not show up in page.php
until I leave and come back in. It retains that value, even for a
change in that value, until I leave and come back in.

I suspect there is something of an asynchronous nature going on. My
question, the answer to which would solve my problem, is how can I get
the value of $totcost from data.php immediately into page.php?

would a header call to reload page.php in the appropriate spot be
applicable? the only other alternative that i can think of off-hand other
than refreshing the tdc data...it's probably caching it...is to tie a js
function in to do the calculation during the appropriate activity.

That was the bug I was trying to fix. While the table displays correctly
after a sort, the calculation remembers the first record (and only that
one) as being the original. Therefore, the js function calculates the
wrong totcost. If I can pass the info during the ** build** of the table
back to the caller (say, by $_SESSION), then I can bypass that bug.
shelly, i'd recommend NOT sessioning the info. find a way to refresh the
page programmatically...as you are explaining doing so manually fixes the
problem. again, i'd try a header() call at the appropriate moment.

and btw, i truly hate tdc and wish they'd have not implemented it in the
several major apps that they have. but as we both know, we get stuck with
it.
Sep 1 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.