on 01-31-2005 6:32 AM
hi
I am trying to show the increament of a variable on bsp page by clicking a button. I am increamenting my variable in OnInputProcess() the code is :
<code>
data: in type I.
in = navigation->get_parameter( name = 'index').
in = in + 1.
navigation->set_parameter( name = 'index' value = in ).
</code>
I have defined 'index' as auto page attribute of type 'I'.
but I could not see the changed value of the valriable in browser on clicking the button.
can you please help me on this.
regards
Ashutosh
<html><body><form>
<% DATA: counter TYPE STRING.
counter = request->get_form_field( 'counter' ) + 1. %>
<input type="submit" name="counter" value="<%=counter%>">
</form></body></html>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Pl. try this code. Make two pages and in first page code this in onInputprocessing.
data: in type I.
in = index + 1.
navigation->set_parameter( name = 'index' value = in ).
navigation->next_page( 'TOFIRSTPAGE' ).
The value that you get in the page described as destination in navigation request TOFIRSTPAGE will be changed.
regards.
vishwas arya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I always use this coding to set and retrieve parameters.
<i>navigation->set_parameter( name = 'parameter name' value = XXXX ).
navigation->goto_page( 'Name of the page' )</i>
Reading a parameter
<i>Variable = request->get_form_field( 'parameter name' ). </i>
It seems you must use get_form_field( ) from the request object instead of get_parameter( ) from the navigation object. But I have never used the get_parameter( ) method before. Have you already debugged the application?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think the problem might be in event handling of htmlb button. I am not sure , but can you tell me whether OnProcessInputting() will be exccutted even if I won't write any eventname on OnClick() method of htmlb button.
or I have to give event name and then use
<code>
event=CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
then
IF event->name = 'button' AND event->event_type = 'click'.
......
.....
</code>
codes like this to trap that event.
I am not really familiar with flowlogic-pages (I always use MVC) so I created what you want to do in my system and it works. Check out the following code:
1) Your page (name test.htm) needs the page attribute <i>count</i>
2) OnRequest Method:
<i>count = request->get_form_field( 'count' ).
add 1 to count.</i>
3) OnInputProcessing Method:
<i>navigation->set_parameter( name = 'count' value = count ).
navigation->goto_page( 'test.htm' ).</i>
Have fun
User | Count |
---|---|
77 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.