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