Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

In google chrome and firefox Register button is not working.

 
Sijesh Alayaril
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In google chrome and firefox Register button is not working.It is not giving any error in the console.Please see the below page code 


<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>


<h:form id="frmTestTube">
  <p/>
  <p>
     
  </p>
  <f:verbatim>
<tr>
        <td valign="top"><h2></f:verbatim><h:outputLabel value="#{msgs.testtube_registration_heading_testtube_reg}" /><f:verbatim></h2></td>
</tr>
<tr><td height="15"></td></tr>
<tr>
        <td valign="top">
        <table border="0" cellspacing="0" cellpadding="0" width="100%" class="Form_contTbl">   
          <tr>
            <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><table width="100%" border="0" cellspacing="0" cellpadding="0" class="alignLeft">
                  <tr>
                  <td class="fieldLabel"></td>
                  <td class="dataSection" height="1"></f:verbatim> 
                     <a4j:outputPanel ajaxRendered="true">
                            <h:messages errorClass="error_login_txt" showSummary="true" showDetail="false" />    
                    </a4j:outputPanel>
                         <%/* <h:outputLabel id="errorMessage" value="#{testTubeRegistrationBean.message}" /> */%>  
                        
                         <%/*<h:outputLabel id="messageId" />
                         <h:message for="messageId" errorClass="error_login_txt" infoClass="color:green" showSummary="true" showDetail="false" />   */%>
                    <f:verbatim>                 
                  </td></tr>
                  <tr>
                    <td class="fieldLabel"></f:verbatim><h:outputLabel value="#{msgs.expat_label_residence_number}" /><h:outputLabel style="color:red" value="#{msgs.required_field}"  /><f:verbatim></td>                   
                    <td class="dataSection"></f:verbatim>
                        <h:inputText id="resdNo" value="#{testTubeRegistrationBean.resdNo}" maxlength ="9" onkeypress="if (event.keyCode<48 || event.keyCode>57) {event.returnValue = false;}" styleClass="txtbox_input" onfocus="this.className='txtbox_input_focus'" onblur="this.className='txtbox_input'">
                              <a4j:support event="onchange" immediate="false" action="#{testTubeRegistrationBean.populateExpat}" oncomplete="document.getElementById('body:frmTestTube:regNumberId').focus();"

                              reRender="invDate,categoryId,centerId,govId,nameId,genderId,passId,countryId,regNumberId,errorMessage" />
                        </h:inputText><!--Changed by Deepika -->
                        <a4j:status id="status">
                             <f:facet name="start">
                                <h:graphicImage value="#{msgs.images}ajax-loader.gif" />
                             </f:facet>
                         </a4j:status>
                        <f:verbatim>
                    </td> 
                 
                  </tr>
                  <tr>
                    <td class="fieldLabel" ></f:verbatim><h:outputLabel value="#{msgs.expat_label_investigation_date}" for="invDateTest" /><f:verbatim></td>
                    <td class="dataSection"></f:verbatim>
                    <t:inputCalendar id="invDate" value="#{testTubeRegistrationBean.expatReg.insertedDate}" monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader" popupButtonStyleClass="standard_bold"
                            currentDayCellClass="currentDayCell" renderAsPopup="true"
                            popupTodayString="#{example_messages['popup_today_string']}"
                            popupDateFormat="#{msgs.date_formate}" popupWeekString="#{example_messages['popup_week_string']}"
                            helpText="" displayValueOnly="false" autocomplete="false" disabledOnClientSide="true" renderPopupButtonAsImage="false"
                            forceId="true" styleClass="txtbox_input disabled" disabled="true"/>                   
                        <f:verbatim></td>
                  
                  </tr>
                  <tr>
                    <td class="fieldLabel" ></f:verbatim><h:outputLabel value="#{msgs.expat_label_category}" /><f:verbatim></td>
                    <td class="dataSection"></f:verbatim> <h:inputText id="categoryId" value="#{testTubeRegistrationBean.expatReg.category.aname}" binding="#{testTubeRegistrationBean.category}" disabled="true" styleClass="textFieldName disabled" /><f:verbatim> </td>
                   
                  </tr>
                  <tr>
                    <td class="fieldLabel" ></f:verbatim><h:outputLabel value="#{msgs.expat_label_center}" /><f:verbatim></td>
                    <td class="dataSection" ></f:verbatim> <h:inputText id="centerId" value="#{testTubeRegistrationBean.expatReg.center.aname}"  binding="#{testTubeRegistrationBean.center}" disabled="true" styleClass="textFieldName disabled"/><f:verbatim> </td>
                 
                  </tr>
                  <tr>
                    <td class="fieldLabel" ></f:verbatim><h:outputLabel value="#{msgs.expat_label_governate}" /><f:verbatim></td>
                    <td class="dataSection" ></f:verbatim> <h:inputText id="govId" value="#{testTubeRegistrationBean.expatReg.governorate.aname}" binding="#{testTubeRegistrationBean.governorate}" disabled="true"  styleClass="textFieldName disabled"/><f:verbatim> </td>
                  
                  </tr>
                  <tr>
                    <td class="fieldLabel" ></f:verbatim><h:outputLabel value="#{msgs.expat_label_name}" /><f:verbatim></td>
                    <td class="dataSection" ></f:verbatim> <h:inputText id="nameId" value="#{testTubeRegistrationBean.expatReg.exprName}"  binding="#{testTubeRegistrationBean.name}" disabled="true"  styleClass="textFieldName disabled"/><f:verbatim> </td>
                   
                  </tr>
                  <tr>
                    <td class="fieldLabel" ></f:verbatim><h:outputLabel value="#{msgs.expat_label_gender}"/>  <f:verbatim></td>
                    <td class="dataSection"></f:verbatim>
                                <h:selectOneRadio  id="genderId" value="#{testTubeRegistrationBean.expatReg.genderCode}" binding="#{testTubeRegistrationBean.gener}" disabled="true"  styleClass="radioBtn">
                                  <f:selectItem itemLabel="#{msgs.expat_label_male}" itemValue="m"/>
                                  <f:selectItem itemLabel="#{msgs.expat_label_female}" itemValue="f"/>
                                </h:selectOneRadio>
                            <f:verbatim></td>
                 
                  </tr>
                
                 <tr>                 
                    <td class="fieldLabel" ></f:verbatim><h:outputLabel value="#{msgs.expat_label_passport_number}" /><f:verbatim></td>
                    <td class="dataSection" ></f:verbatim><h:inputText id="passId" value="#{testTubeRegistrationBean.expatReg.passNo}"  binding="#{testTubeRegistrationBean.passportNo}" disabled="true"  styleClass="txtbox_input disabled"/><f:verbatim>   </f:verbatim>
                        <h:outputLabel value="#{msgs.expat_label_nationality}" /> <f:verbatim> </f:verbatim><h:inputText id="countryId" value="#{testTubeRegistrationBean.expatReg.countryByCountryCode.arabicName}"  binding="#{testTubeRegistrationBean.nationality}" disabled="true"  styleClass="txtbox_input disabled"/>
                    <f:verbatim> </td>                                 
                </tr>
               
                <tr>
                    <td class="fieldLabel" ></f:verbatim><h:outputLabel value="#{msgs.testtube_registration_label_sample_number}" /><h:outputLabel style="color:red" value="#{msgs.required_field}"  /><f:verbatim></td>
                    <td class="dataSection" ></f:verbatim>
                     <!--Start : onkeypress Added by deepika to add sample number 2nd June 2013 -->
                        <h:inputText id="regNumberId" value="#{testTubeRegistrationBean.regNumber}"  onkeypress=" if ((event.keyCode >=97 && event.keyCode <=122)||(event.keyCode >=224 && event.keyCode <=244)) {
event.keyCode = event.keyCode - 32;}" styleClass="txtbox_input" onfocus="this.className='txtbox_input_focus'" onblur="this.className='txtbox_input'"/>
                 <!--End : onkeypress Added by deepika to add sample number 2nd June 2013 -->                        
                    <f:verbatim> </td>                   
                  </tr>
                 
                <tr><td colspan="2"> </td></tr>
                <tr>
                   <td> </td>
                    <td></f:verbatim>
                        <a4j:outputPanel  ajaxRendered="true" id="msg1">
                        <h:commandButton id="btnReg" value="#{msgs.testtube_registration_button_registration}" action="#{testTubeRegistrationBean.register}" rendered="#{testTubeRegistrationBean.ufmTesttubeReg.addRecordYn==1 && testTubeRegistrationBean.ttRegistration.id == 0 || testTubeRegistrationBean.ttRegistration.id == null}" styleClass="inputBtn" onmouseover="this.className='inputBtnHover'" onmouseout="this.className='inputBtn'">                       
                        </h:commandButton>
                    </a4j:outputPanel>   
                    <f:verbatim> </f:verbatim>
                    <a4j:outputPanel ajaxRendered="true" id="msg2">
                        <h:commandButton value="#{msgs.button_label_update}" action="#{testTubeRegistrationBean.register}" rendered="#{testTubeRegistrationBean.ufmTesttubeReg.editRecordYn==1 && testTubeRegistrationBean.ttRegistration.id > 0}" styleClass="inputBtn" onmouseover="this.className='inputBtnHover'" onmouseout="this.className='inputBtn'">                       
                        </h:commandButton>
                    </a4j:outputPanel>   
                    <f:verbatim> </f:verbatim>
                    <h:commandButton value="#{msgs.button_label_reset}" action="#{testTubeRegistrationBean.clearForm}" immediate="true" styleClass="inputBtn" onmouseover="this.className='inputBtnHover'" onmouseout="this.className='inputBtn'"/><f:verbatim>  </f:verbatim>
                    <%/* <h:commandButton value="#{msgs.button_label_home}" action="welcome" immediate="true" styleClass="inputBtn" onmouseover="this.className='inputBtnHover'" onmouseout="this.className='inputBtn'"/> */%>
                <f:verbatim></td>
                </tr>
                </table></td>
               <td width="380" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%">
                 <tr>
                    <td ><div class="picTblBdrView"><!--img src="images/man_pic.jpg" border="2" height="160" width="200"-->
                        </f:verbatim>
                            <a4j:outputPanel id="photoId" ajaxRendered="true">        
                               <h:graphicImage value="#{testTubeRegistrationBean.showExpatPhoto}" width="160" />
                            </a4j:outputPanel>
                        <f:verbatim>
                    </div></td>                  
                  </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
</tr>

</f:verbatim>
</h:form>

<script type="text/javascript">
    document.getElementById('body:frmTestTube:resdNo').focus();
</script>
 
Tim Holloway
Saloon Keeper
Posts: 18365
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Long literal blocks of code don't usually get answers. No one here gets paid to wade through that stuff.

The first thing you need to do when something doesn't work is to trim away everything but the part that's a problem for you. Sometimes you may even find the problem yourself while you do that. If not, then at least when you post it, people will read it.

You have an additional problem, though. That code is for JSF version 1 and JSF verson 1 has been obsolete for about half a decade or so.

 
Sijesh Alayaril
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Tim, For the same query I have posted multiple questions and everyone says i'm missing something.Here i have some limitations.I'm supporting a system that is 6-7 year old and there is no documentation.I'm trying my level best to put all the information.Thanks for your help. 
 
Tim Holloway
Saloon Keeper
Posts: 18365
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm going to say something that sound very brutal, but it is nevertheless true.

Despite the popular conception, software does wear out. You cannot simply pay for it once and it runs forever.

Sure, the bits don't literally rot, but there is nevertheless rot, and it comes from the outside in. The hardware gets replaced, the OS gets upgraded, older software won't run under the new OS, frameworks become obsolete. I once had a project where a 2-line code change required me to install an obsolete version of Microsoft Developer Studio, install obsolete maintenance patches, and build an executable at 2:00 am. It was not fun and even less so because I very nearly had to install an obsolete copy of Windows and obsolete service packs just to be able to run the obsolete version of Visual Studio.

I have a stack of Pentium computers near my desk. They each have more processing power than the high-end IBM mainframe  I used to support in the early/mid 1980s. But I don't power them up and use them, because they cannot run modern software. Indeed, they don't even have enough resources to run a Java IDE on them. They'd waste more power operating them than they'd produce in value. In fact, the only reasons I don't scrap them is that I have some old peripherals that I'd like to auction off and I need the old boxes to be able to test them. That and someone might someday be willing to pay me enough to do a project that, like yours, needs to run on antiquated infrastructure.

There comes a point where it's no longer cheaper to maintain a program than to upgrade or replace it. You've reached that point. It's no longer possible to hire a cheap consultant off the street to work with JSF version 1. JSF version 1 is just too different from JSF version 2 at the internal levels. JSF2 doesn't use JSPs or tag libraries, it uses XML View Templates. The only places you'll find people with that kind of expertise are people, who like yourself, are stuck maintaining obsolete software and therefore probably working too hard to be able to spare time for you or people like me who hoard old knowledge and charge premium rates for it.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15634
46
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
New versions of JSF also have proper support for AJAX.

You are using a very old JSF 1.x version which does not have built-in support for AJAX and it looks like you are using a third-party library to add support for AJAX to your old JSF version:

Your Register button is in an outputPanel component that comes from this AJAX library:

Maybe the problem is in that library, maybe it contains something old that doesn't work (anymore) in current versions of Chrome and Firefox.

To solve this, you'd really have to dive into what is happening exactly, using proper debugging tools. I would start with the debugging tools that are built into Chrome or Firefox (press F12 on Chrome to get to the debugging window).

You really have to dive into the details and carefully follow what's happening, and you might have to look into the source code of the AJAX library that you're using.
 
Tim Holloway
Saloon Keeper
Posts: 18365
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jesper, you bring up a very good point.

The a4j tagset is the AJAX extensions for the RichFaces add-on JSF components. It was an important part of RichFaces version 3, but has been supplanted by the built-in AJAX support in JSF version 2.

Something that is extremely important to know about RichFaces version 3 is that it cannot function properly with versions of Internet Explorer newer than IE8. That is, IE9, 10, 11 don't work right. Up to and including IE8, Microsoft had some non-standard function definitions that IE9 fixed, but RichFaces 3 doesn't know about.

Red Hat has officially stated (several years ago) that RichFaces Version 3 will - and I quote: never support versions of IE later than IE8. Up until recently, you could put META tags on pages to get later versions of IE to work in IE8 mode, but Microsoft dropped that guarantee last February, I think it was.

So it's not just an out-of-code JSF that's a problem. It's out-of-code RichFaces as well. And while it's usually not that difficult to upgrade a JSF version 1 webapp to run under JSF2, upgrading from RichFaces version 3 to RichFaces 4 is a  :censored:
 
Sijesh Alayaril
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Much appreciated and Many Thanks Tim and Jesper for the information.Yes i understand the issue is with ajax component.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic