document.getElementById in PRIMEFACES_MOBILE does not work

UI Components for JSF
Post Reply
scicoti
Posts: 1
Joined: 08 Sep 2013, 06:01

30 Aug 2017, 15:39

Why this code not work in primefaces-mobile??

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:pm="http://primefaces.org/mobile">
<f:view renderKitId="PRIMEFACES_MOBILE" />
<h:head>
<script type="text/javascript">
$(document).ready(function(){
document.getElementById('testForm:idA').value = 1;
document.getElementById('testForm:idB').value = 2;
});
</script>
</h:head>
<h:body>
<pm:page>
<pm:header title="Title"></pm:header>
<pm:content>
<h:form id="testForm">
<p:inputText id="idA" />
<p:inputText id="idB" />
</h:form>
</pm:content>
<pm:footer title="Footer"></pm:footer>
</pm:page>
</h:body>
</html>

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 24 guests