hi,
iam having an application in which i need to validate all the fileds present above a particular field when user clicks on any field present in a page.similar to this link
http://my.naukri.com/manager/createa...cp=5424&wExp=N

is this possible using javascript.
can we use javascript to achieve this functionality.
if thru javascript it is possible,can any one send me the code.

waiting for u r replies

Thanks in advance

Hi Nagekar,

What sorts of validation do you need, asside from an alert box? And also the link that you have provided, does not exist...

Rakesh,

Consultancy not code, I'm afraid ......

Check-as-you-go can be necessary under some circumstances; in particular if features of your page (including the form itself) need to adapt in response to user values or selections. However, most forms can be checked on submission.

By adopting a check-on-submission strategy, you will save yourself a lot of (interesting) heartache coding check-as-you-go in the way you describe.

If you must check-as-you-go it is generally better (certainly more easily) implemented as check-one-field-at-a-time rather than check-all-completed-fields-to-date.

Check-one-field-at-a-time is easier to code (invoke each form element's check onblur) and normally adequate since, under this strategy, all previously completed fields will have been checked already.

If the checks require that fields are completed in a prescribed order (eg. because of data interdependencies), then you can disable/enable (or hide/show) form elements as you go. You cannot rely on users to work strictly top-to-bottom in an unconstrained form.

Hope this helps.

Notwithstanding my advice, I would be interested to know why you are contemplating a check-all-completed-fields-to-date strategy. There could indeed be unusual circumstances in which it is appropriate.

Airshow

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.