CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Keep field contents after link use

Print topic Send  topic

Author Message
svorlow

Posts: 18
Posted: 12/14/2004, 11:58 AM

Hi,

we have a serious problem keeping the field contents in search forms after using a non form link. For example:

We use a search form for finding users on the left hand side of the screen
On the right hand side we have a tree for chosing a region, where the guy lives that I search. When I chose the region, the region is entered in the search form and all the other data in the search form are gone.

We tried to keep the data persistent, but as they are entered as text there is no link parameter that keeps it persistent.

Any idea is apreciated

Stephan
View profile  Send private message
peterr


Posts: 5971
Posted: 12/14/2004, 5:24 PM

If by "non form link" you mean just an HTML link, I recommend that you change it to CCS Form Link and set its "Preserve Parameters" property to "GET".
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Stephan
Posted: 12/14/2004, 11:37 PM

Hallo Peter,

I fear it is not a problem by the Link on the right hand side (that indeed refers to another Codecharge element, in our case a directory form) but by the Text boxes in our search form (left). They are empty after after using a link somewhere on the page.
I just need a user exit to write the content in the url to restore it on page load. The links call the page itself again - and the user is missing his entries in the textboxes.

You see the problem?

Best regards

Stephan
peterr


Posts: 5971
Posted: 12/14/2004, 11:56 PM

I think I understand now, though I'm afraid that this can be quite complex to implement. The HTML forms are meant to be submitted, not refreshed (without loosing values), so that's just how the Web applications work. You could probably submit the form and create temporary record, or use some JavaScript to append current values to the link. I have never tried this, so maybe someone else will provide specific solution or tip.

Though much easier may be not to refresh the page, just use some JavaScript for your region selection, so that the region is copied to the search form without refreshing it.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Damian Hupfeld
Posted: 12/15/2004, 1:12 AM

Why are you trying to retain the values?
Do the users login? Perhaps you can write the value to a table?
If there are multiple forms - you can make them required so that when you
hit submit and you have only put info in one text field it will not submit,
but you can use the value to update other components on the page.

Maybe this link will help?
http://forums.codecharge.com/posts.php?post_id=49462

regards
Damian Hupfeld
http://www.nexthost.com.au/services.php
Stephan
Posted: 12/15/2004, 3:56 AM

Hi Peter,

you are right. Today we discussed to put the right hand side directory into a frame or an iframe. If some parameters are chosen we just use Javascript to fill in the fields on the left hand side text box - without reloading it by the server. I hope that all the other fields will keep its content then. A temporary record is to much work for the server. We will try that.

Best regards

Stephan

Quote peterr:
I think I understand now, though I'm afraid that this can be quite complex to implement. The HTML forms are meant to be submitted, not refreshed (without loosing values), so that's just how the Web applications work. You could probably submit the form and create temporary record, or use some JavaScript to append current values to the link. I have never tried this, so maybe someone else will provide specific solution or tip.

Though much easier may be not to refresh the page, just use some JavaScript for your region selection, so that the region is copied to the search form without refreshing it.
Stephan
Posted: 12/15/2004, 4:05 AM

Hi Damian,

yes, they are logged on users. But we try to get rid of to much database traffic so we will decide to use java script on putting detail data from the right hand side to this text field on the left hand side. We will use iframes (I already described it in this thread).

Hopefully that works, I will report

Stephan

Quote Damian Hupfeld:
Why are you trying to retain the values?
Do the users login? Perhaps you can write the value to a table?
If there are multiple forms - you can make them required so that when you
hit submit and you have only put info in one text field it will not submit,
but you can use the value to update other components on the page.

Maybe this link will help?
http://forums.codecharge.com/posts.php?post_id=49462

regards
Damian Hupfeld
http://www.nexthost.com.au/services.php
peterr


Posts: 5971
Posted: 12/15/2004, 11:11 AM

I think that this can be done without frames or iframes, for example in onchange event of the Region listbox. Various examples are at http://www.google.com/search?hl=en&lr=&q=javascript+copy+fields

This is just a suggesiont since this is your project and I don't know too much about it.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Stephan
Posted: 12/16/2004, 4:26 AM

OK, we finally chose the frame solution. It seems to work well and we keep the content in our textfields. Thanks to all for your support. I hope we will soon deliver a wonderfull web application.

Stephan

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.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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