Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

value not getting displayed from jsp

Posted on 2014-04-07
5
Medium Priority
?
572 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 36

Accepted Solution

by:
mccarl earned 1500 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

660 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