CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Preserving textbox values before submitting.

Print topic Send  topic

Author Message
aakici


Posts: 49
Posted: 01/26/2005, 10:34 PM

I have page with two forms (one record form, other editable grid). I have a textbox control (ORDERTOTAL) in record form. Value of thjs textbox is controlled by editable grid. When i submit record form, my editable grid is comes visible. I enter values on editable grid then value of ORDERTOTAL is calculated. I want to save this textbox value to be recorded to the record forms table. But when click on the submit button of the editable grid value of ORDERTOTAL becomes NULL. How can i preserve value of this textbox so i can use this value in my SQL command?
_________________
Regards,
M.Alpaslan AKICI
View profile  Send private message
peterr


Posts: 5971
Posted: 01/27/2005, 2:18 AM

I believe that HTML specifications do not allow 2 forms to be submitted together, thus the values of other (non-submitted) forms must be lost. A workaround could be to create a hidden field within your editable grid and then populate that hidden field together with the record form's textbox, so that you have that value in both forms and it always gets submitted.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
aakici


Posts: 49
Posted: 01/27/2005, 3:04 PM

Problem is this: i have to use Before Submit event. However, when this event occurs all data in the grid is lost. I must use a variable which is global and never lost. How can i do this?
_________________
Regards,
M.Alpaslan AKICI
View profile  Send private message
aakici


Posts: 49
Posted: 01/28/2005, 4:20 PM

i solved my problem. thanks anyway.
_________________
Regards,
M.Alpaslan AKICI
View profile  Send private message
klwillis


Posts: 428
Posted: 01/28/2005, 4:43 PM

Would you mind sharing what you did to resolve the problem? 8-)

Quote aakici:
i solved my problem. thanks anyway.

_________________
Kevin Willis, VP/CIO
HealthCare Information Technology Specialist
http://www.nexushealthcare.com
"Fast - Convenient - Quality-Care"

Medical Software Consulting Services
Email : klwillis@nexushealthcare.com
Skype : klwillis2006
View profile  Send private message
aakici


Posts: 49
Posted: 01/30/2005, 2:18 PM

Of course, i don't mind. Information must be share between any person who wants to learn something and sharing ibformation he has.

Here is my solution.

First of all, this is just a trick.

i added a textbox on my editable grid. then assign value of ordertotal textbox on the record form to the texbox on editable grid. To assign the current value of ordertotal textbox on the record form to the texbox on editable grid i used onchange event of a listbox. when listbox change value is assigned to textbox on grid. I used listbox because value of ordertotal textbox on the record form doesn't change.

The code in onchange event of listbox is like this :
document.orders.ordertotal.value = FormattedToFloat(aratoplam);
(FormattedToFloat is a javascript function that converts a formatted number to float number)

_________________
Regards,
M.Alpaslan AKICI
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.