Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6966113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:08:59+00:00 2026-05-27T16:08:59+00:00

In primefaces 3.0.M3, While using document.getElementById(‘confirmPassword’) for getting textBox value to javaScript, which gives

  • 0

In primefaces 3.0.M3, While using document.getElementById(‘confirmPassword’) for getting textBox value to javaScript, which gives a null value!
Code is:
in primefaces:

<h:outputText value="Confirm Password*" />
<p:password
value="#{employeeRepositoryImpl.securityPrincipals.confirmPassword}"
required="true" label="Confirm Password" id="confirmPassword" for="confirmPassword" onkeyup="check()" >
update="confirmPassword" />
</p:password>

in javaScript:

function check(){
    var title1 = document.getElementById('confirmPassword'); 
    var title2 = document.getElementById('password'); 
    alert(title1+title2);}

I have set prependId=”false” . But alert shows null.Any other way to do the same?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:08:59+00:00Added an answer on May 27, 2026 at 4:08 pm

    As you mentioned, the HTML that is generated is as below

    <input id="formId:confirmPassword_input" class="ui-inputfield ui-password ui-widget ui-state-default ui-corner-all" type="password" onkeyup="checkPass()" value="fd" name="formId:confirmPassword_input">
    

    which means still form appends id from it, please recheck your h:form under which these components lies and set the prependId="false"

    and if you try to get the HTML dom with id confirmPassword it will return null where the actual ID in HTML is formId:confirmPassword_input

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting following weird error while integrating SWF,Primefaces 2.2.1,JSF 2,Spring Security 3,Spring 3.1.0
Primefaces tabView activeIndex property is always getting null. My view.jsf: <h:form> <p:growl id=growl showDetail=true
i am using primefaces library this is my jsp page source: <%@taglib uri=http://primefaces.prime.com.tr/ui prefix=p%>
I am doing a project where I am using JSF 2.0 & Primefaces UI
I have a form with following fields.While click on submit button I am getting
I have a modal ConfirmDialog that is shown over a modal Dialog using PrimeFaces
Primefaces Datatable let you configure the filtering type you use for a column, using
I am using Primefaces and JSF2 . All my .xhtml files are dumped in
I can't get the primeFaces <p:filedownload work. While I succeed in downloading the file
I am using PrimeFaces and JSF. Can anyone tell me how do I reorder

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.