I want to use javascript for field validation on a domino form, but I am not that good at js. Can you give me an example (ie. how to check that the name field isn’t blank, and pop-up a js alert when the form is submitted), also where does the code go?
Subject: can anyone give me a clue how to use javascript field validation
There are tons of examples of this on the web - I suggest going to w3shool’s site if you want to read up on js.
Codestore.org is also a great place for code examples.
Subject: RE: can anyone give me a clue how to use javascript field validation
Thanks for the codestore link, I have been doing the w3school tutorial, but both of these aren’t domino specific. Even if i understand the code eventually, I still won’t know how to use it in domino. For exampleI can put the functoin in the Head but do I then put the calling command in the domino save button, does that work?
Subject: RE: can anyone give me a clue how to use javascript field validation
Ah, so you’re actually at the level of trying to learn where to put the js. That makes sense.
Yes, you can put your code in the JS Header. As a practice try to be consistent with how you do it. For example, in my organization we choose “Client” in the “Run” dialog box and in the next box over we choose “Common Javascript” (we are a web-only shop). You can get yourself into trouble by mixing these options in various elements on a form.
Buttons can be a little bit trickier. I recommend using hotspots wherever you can, assuming your button is a graphic.