javascript - Getting field values from another form to perform validation on the web in lotus notes -


i have radio button field on lotus notes form (say main form). if selected "yes", link gets unhidden. on click of link, form opens up. if in radio button, "yes" selected in main form, contents in second form must filled. need write validation if radio button field "yes" , field inside second form not filled, should show popup asking fill field in second form. how value of field in second form on main form me perform validation?

you literally cannot you've described want do. second (pop-up) form , content no longer exist in client (browser) context when want validation on first form's data. there 3 possible ways tackle problem 2 of them practical.

let's dispense impractical method first. have pop-up form write parent/opener, either javascript variable or dom content (a field outside of domino form or hidden element or such) or, perhaps cookie value. setting opener relationship reliably can problem cross-browser, doable. problem no matter how this, have no guarantee value there when need (or expect it) except when parent form filled out. if document ever edited, have no way of knowing whether or not user has filled in data on pop-up. may have written js variables or dom during initial session form exist during initial session. cookies aren't permanent; can cleared user if try give them eternal life via expires value. no matter how it, you'd telling has filled out data want need fill out again.

the second method make call server see if pop-up form has been submitted , turned notes document. doesn't scale @ all; if happening on single server, there's no way guarantee document looking have been written , indexed time need it, , there time factor involved. if user has seen validation nagging once, tell them do, , gets nag again, you're not making friends.

the third method need on 1 form. (you can use css pop-up if you're married pop-up idea.) and, know, doesn't matter @ whether or not prefer way, it's way reliable , make happy users. yes, mean little bit of work on part. you're developer - that's living. can keep structure of existing application intact; wqo , wqs agents mean can glue documents before sending them user, , pull them apart again before save them. method guaranteed fast enough , reliable enough usable on web.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -