Mark
|
| Posted: 07/02/2002, 3:35 PM |
|
Hi,
I have 3 forms on a page.
Each form contains a listbox and a button.
The first two (search) forms have server events, which take the value selected in that particular listbox & populate a label & a hidden field in the third (record) form.
The idea being that whatever option is selected in Form A, is duplicated in Form C. If a choice is then made from Form B, it over-writes what's in Form C.
Again, if a different option is then selected from Form A, it over-writes what's in Form C.
The code that does the populating of Form C works just fine and is the same in Forms A and B, except they pick up whatever value is selected from their particular listbox.
The trouble is - it doesn't work !
Either Form A or Form B will work, but not both of them.
I've tried moving the server events around - they were originally in the Button Before Show on each form, but it hasn't helped...
Any ideas ?
I think whichever of the events in placed in the Before Show seems to take preference & the other Form's event doesn't work.... not too sure.
If both events are in their Form's Before Show, the second one works & the first one doesn't !
Help !
Thanks,
Mark
|
|
|
 |
Nicole
|
| Posted: 07/03/2002, 5:10 AM |
|
Mark,
How have you assigned values to the fields on the FormC?
Try to use the code like below in FormC/field_name Before Show event (right click on the event and select Add Code)
PHP
//if parameter were passed using GET method
global $form_name;
$form_name->field_name-SetValue(CCGetFromGet("param_name", "default_value"));
//if parameter were passed using POST method
$form_name->field_name-SetValue(CCGetFromPOST("param_name", "default_value"));
ASP
'GET method
form_name.field_name.Value = CCGetFromGet("param_name", "param_value")
'POST method
form_name.field_name.Value = CCGetFromPost("param_name", "param_value")
|
|
|
 |
|