document.getElementById in PRIMEFACES_MOBILE does not work

Mobile UI Kit
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
  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests