Prasad Bolla's SharePoint Blog

Click Here to go through the Interesting posts within my Blog.

Click Here to go through the new posts in my blog.

Wednesday, March 09, 2016

Validate People Picker and TextBox using Jquery


//TextBox
if($("#ctl00_m_g_1908d4f6_cfae_448c_ab52_87ffc22498be_ctl00_ctl05_ctl00_ctl00_ctl00_ctl04_ctl00_ctl00_TextField").val()=="")
        {
            alert('Please enter Title');
            return false;
        }
       
       
    //People Picker    if($("#ctl00_m_g_1908d4f6_cfae_448c_ab52_87ffc22498be_ctl00_ctl05_ctl05_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_upLevelDiv").text()=="")
        {
            alert('Please enter Username');
            return false;
        }

No comments:

Post a Comment