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

 Extract text box to session variable on client side

Print topic Send  topic

Author Message
davidpowell

Posts: 14
Posted: 09/29/2014, 6:46 AM

Hi,
Can anyone help me with this?
I want to extract the value of a control (ie for example user choice on a radiobutton control) on a webpage and put it into a session variable when during an onclick event on the client side.
The reason for this is that I accumulate several data items from several web pages and then finally insert them into a table on the last page of the series.

My challenge is 1. how to reference a control eg textbox on the form to get the userdata out and 2. how to reference a session variable to insert the data into it.

I have found sessionstorage functio but am not sure if it is right or how to use it!!

You may not guess this, but I am not a codecharge or java expert!!!
any help gratefully received.

David
_________________
David Powell
View profile  Send private message
eratech


Posts: 513
Posted: 11/01/2014, 11:13 PM

David,

I'm not usually on the Java side of programming, but this sounds like something CCS can handle with it's built in Actions.

In the Before Insert or Before Submit etc event for the Record, add an Action of 'Save Value from Control' and you can choose the control to get it from, the type of place to save it (Session) and give the session variable a name and CCS will save it there.

Later if you want to retrieve it, put a 'Before Show' event of 'Retrieve Value for Control' and choose the control you want to put it in, and put the session name and type 'Session' in.

You can also retireve values into Variables and use them in custom code (use 'Declare Variable' first)

For a programmer, it might seem odd to use the built-in actions when sometimes you can do it in fewer lines in a 'Custom Code' block, but the Built-in actions have 2 really big advantages:

1. They will often put in declaration or default setting code
2. They will be converted by CCS automatically when you upgrade or convert the project to another programming language, which you will need to do by hand for any Custom code.

Hope that helps - CCS will do a lot of the work. If you haven't tried the Help file, I strongly suggest it as there are many examples in several languages.

Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message
ahmedvu153

Posts: 1
Posted: 01/26/2015, 9:41 PM

CSS and C++ are both developer are in progressing his java application in many OS
_________________
ahmed
View profile  Send private message
MichaelMcDonald

Posts: 640
Posted: 02/15/2015, 1:57 PM

Have a look at this link and use the js "var =" to get the value from the textbox/hidden and then pass it to another page using xmlhttprequest, and GET and set it as a session variable using CCSetSession on the destination page.


http://forums.yessoftware.com/posts.php?post_id=123299
_________________
Central Coast, NSW, Australia.

View profile  Send private message
James017

Posts: 1
Posted: 11/03/2015, 10:49 PM

The '&' is probably being url encoded when the Search is done and normally would set the value, but the '&' is probably returning as '&' and not matching.????
_________________
Ali
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.

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.