Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Apex Items Validation using Jquery code (name="p_t13")

Irha10Jul 25 2017 — edited Jul 25 2017

Hi,

Application Express 5.0.4.00.12

Oracle 12c

Very little things but struggling.

I have a form and region for create / Amend a form. I have few items in it including text and LOV. I am trying to validate the null values before submit using the below code but it does not work.

please note: if I use,  if ($('[name="p_t+[i]"]').val() === '') { i from loop then it does not work or i am not doing in right way.

if use p_t13 or any other name such p_t14 so on then it work. Please help.

$('#create_btn').click(function() {

     for (i=13;i<30;i++) {

        if ($('[name="p_t13"]').val() === '') {

           $('[name="p_t13"]').css('background','#FFD8B5');

       }

    if ($('[name="p_t13"]').val() != '') {

           $('[name="p_t13"]').css('background','');

       }

         }

    });

Many thanks,

IR

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 22 2017
Added on Jul 25 2017
3 comments
300 views