Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » PHP

session variable and TDC control

 
Jump to:  
 
sheldonlg
PostPosted: Sun Aug 31, 2008 10:45 am    Post subject: session variable and TDC control
       
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?
 

 
Dale
PostPosted: Sun Aug 31, 2008 4:14 pm    Post subject: Re: session variable and TDC control
       
<sheldonlg> wrote in message
news:f_-dnZgTcafuDyfVnZ2dnUVZ_sTinZ2d@giganews.com...
Quote:
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.
 

 
sheldonlg
PostPosted: Sun Aug 31, 2008 4:35 pm    Post subject: Re: session variable and TDC control
       
Dale wrote:
Quote:
sheldonlg> wrote in message
news:f_-dnZgTcafuDyfVnZ2dnUVZ_sTinZ2d@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.
 

 
Dale
PostPosted: Mon Sep 01, 2008 2:59 am    Post subject: Re: session variable and TDC control
       
<sheldonlg> wrote in message
news:ZsCdnUpG55gReSfVnZ2dnUVZ_rvinZ2d@giganews.com...
Quote:
Dale wrote:
sheldonlg> wrote in message
news:f_-dnZgTcafuDyfVnZ2dnUVZ_sTinZ2d@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.

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.
 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

Język C++. Metaprogramowanie za pomocą szablonów bet at home Techno aikido amulety t.2 dream dictionary filmiki