Solved

value not getting displayed from jsp

Posted on 2014-04-07
5
543 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to implement Singleton Design Pattern in Java.

863 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now