Solved

value not getting displayed from jsp

Posted on 2014-04-07
5
559 Views
Last Modified: 2014-04-30
Hi,
I am attaching two files for a page of a web application.
The payment.txt (payment.jsp file name changed for uploading reason) jsp is the file which gets rendered in the page.
And the other file is the one which i got by pressing ctrl+U (view source) in firefox.

The problem which i am encountring is at line :
                                                <input id="loggedInMobile" onkeypress="return isNumberKey(event)" mylabel="Mobile Number" validation="required|defaultInvalid|regTypeIsd[phone,10,loggedInMobileISD]" value="${user.userMobileNo}" class="PayConInput inputTxtBox disableinput" msginfo="* required,,* Mobile number should be 10 digit" type="text" maxlength="10" tabindex="144" readonly style="width:90px" />&nbsp;<a tabindex="143" id="editMobile" href="javascript:fReview.editMobile();">Edit</a>

This line ideally should display the mobile no. which is held in ${user.userMobileNo}

As can be seen in the source the mobile no. is getting passed in jsp at the line :
      <input type = "hidden" name = "user.userMobileNo" id = "userMobileNo" value ="9711070972"/>

      But still i randomly see occasions when the mobile no. is not displayed on the webpage.
      How could this be possible ?
      This specially happens when i open the same page again in other tab
source-wen-mobile-no.-not-coming.txt
payment.txt
0
Comment
Question by:Rohit Bajaj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 39982906
in the view source code also mobile number is getting displayed.
check at what time below value is not getting dispalyed in this tag.

      <input id="loggedInMobile" onkeypress="return isNumberKey(event)" mylabel="Mobile Number" validation="required|defaultInvalid|regTypeIsd[phone,10,loggedInMobileISD]" value="9711070972" class="PayConInput inputTxtBox disableinput" msginfo="* required,,* Mobile number should be 10 digit" type="text" maxlength="10" tabindex="144" readonly style="width:90px" />&nbsp;<a tabindex="143" id="editMobile" href="javascript:fReview.editMobile();">Edit</a>
0
 

Author Comment

by:Rohit Bajaj
ID: 39982933
The above view source was an example when on ui the mobile no. 9711070972 didnt get displayed although it appeared in the view source
This is rare.. I am able to reproduce it very infrequently
0
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 39982948
until we see the code we cannot judge where the prooblem lies.
0
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 39991134
As per my understanding in your code . Its failed in your validation

<input id="loggedInMobile
onkeypress="return isNumberKey(event)" 
mylabel="Mobile Number" 
validation="required|defaultInvalid|regTypeIsd[phone,10,loggedInMobileISD]" 
value="${user.userMobileNo}"
 class="PayConInput inputTxtBox disableinput" msginfo="* required,,* Mobile number should be 10 digit"
        type="text" maxlength="10" tabindex="144" readonly style="width:90px" />&nbsp;
<a tabindex="143" id="editMobile" href="javascript:fReview.editMobile();">Edit</a>

Open in new window

0
 
LVL 35

Accepted Solution

by:
mccarl earned 500 total points
ID: 39998124
In the view source, while your <input> field definitely has the mobile number there, the enclosing <div> element has a style of "display: none". Is that the issue, that the entire input field is not there OR is the field there and you just don't have the value inside it?

I realise that there may be some CSS/Javascript/JQuery/etc that changes this style and makes it visible but with a brief search of the "source" I couldn't find it, and I can't really do any detailed debugging of ALL those lines of code to find it. What I am getting at, is that if you have some JQuery code somewhere perhaps that is making the <div> displayed again, then it may also be interfering with the field value.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
The viewer will learn how to implement Singleton Design Pattern in Java.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question