473,383 Members | 1,868 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

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?
Aug 31 '08 #1
3 1333

<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
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

<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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: opt_inf_env | last post by:
Hello, I have a page such that each user can see only a corresponding (personal) part of the page. In the beginning I wanted to perform initialization of users (by asking there names and...
14
by: Paul Yanzick | last post by:
Hello, I am trying to develop a book tracking application for my capstone in school, and am running into a problem. The application is an ASP.Net application written in C#. The first page you...
0
by: Paul | last post by:
Hello, all --- Environment: Visual Studio.NET 2003 (C#); Windows 2003 Server; IIS 6.0 Here is the problem I am having. I have created a web custom control in C# which includes a datagrid,...
2
by: Paul | last post by:
Tried to post this hours ago, but it still isn't visible. If it's a repeat, sorry for the inconvenience. Hello, all --- Environment: Visual Studio.NET 2003 (C#); Windows 2003 Server; IIS 6.0...
2
by: Frank Schumacher | last post by:
Hi NG, I have another problem with User controls. Thanks to your help I was finaly able to create a Control, which is doing what I want it to do. But now I want to add more than one...
2
by: Diffident | last post by:
Hello All, I have a nested user control i.e., Control B which is loaded from Control A. Control A is itself dynamically loaded from a web form. Control A has a "Save" button which loads the...
13
by: Alexander Widera | last post by:
hi, who has seen the follow problem or could help please? i visit a page .... i read a sesssion-var . ... everythink works...... i visit the page again..... error ... the sessionvar is null .... i...
3
by: Phillip N Rounds | last post by:
I'm writing a user control which has two states: Active & InActive. I additionally am required that there to be only one active control per page, and all logic has to be contained within the...
2
by: Gurunadh | last post by:
Hi i've some web user controls in one folder and web pages in some other folder. and i've included header web user control in all my web pages. and in that user control wrote code to get the...
4
by: rgparkins | last post by:
Hello I am running out of time with a problem I have running PHP 5.04 and Apache 2.0 and really need help :(. I have a page that stores a variable in session but each time I reload that page the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.