NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: golmedo on May 28, 2014, 12:20:52 PM
-
I have the following question:
I want to enable or disable the Insert button of a child browse, depending on whether all fields in the parent form are completed...
The browse on form scheme in my WebServer is:
parent_process_form.fields1
parent_process_form.fields2
parent_process_form.child_process_browse (embed)
parent_process_form.child_process_browse.Insertbutton <--(IF parent_process_form.fields1 and parent_process_form.fields2 THEN enable(child_process_browse.Insertbuttonn) ELSE (disable(child_process_browse.Insertbutton)) )
I want to change the enable/disable state of the button without reloading the page...
-
Hi Gustavo,
Ok, I think it's do-able, although I haven't tried it specifically.
a) set a condition for the Insert button on the child Browse. Say something like
p_web.GetSessionValue('okToInsert') = 1
b) On the parent form, set the sessionValue to be 0 when the form is generated. ie in GenerateForm routine;
p_web.SetSessionValue('okToInsert',0)
c) For each of the form fields that must be set, in the validate::FieldEquate routine put something like
if p_web.GetSessionValue('fil:fields1') and p_web.GetSessionValue('fil:fields2') and ....
p_web.SetSessionValue('okToInsert',1)
end
d) For each of the fields in ( c) add the Browse to the "Reset List" for that field.
Cheers
Bruce