Solved

without using hidden variable how to submit the disabled textbox value.

Posted on 2010-08-17
10
701 Views
Last Modified: 2012-05-10
HI,

In my web application i have 10 disabled textbox and it have some value,  I need to submit the textbox value to server side.

For this i need to create a 10 hidden variable to submit the value.

without using hidden variable how to submit the disabled textbox value.

how to solve the problem, if any right way is there?

For example:
    // this is my code in JSP
    <form name="consultantFrm">
   
    <input disabled type="text" name="mailUIAddressEmpSt1" maxlength="256" size="30" class="controlStyle" value="Gandhi street" tabindex="1">
    <input type=hidden name=mailAddressEmpSt1 value="">
   
    </form>
   
    <script>
    document.consultantFrm.mailAddressEmpSt1.value = document.consultantFrm.mailUIAddressEmpSt1.value;
    document.consultantFrm.submit();
    </script>
0
Comment
Question by:Zoniac
[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
  • 4
10 Comments
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 33452345
use read only mode of text box u cant edit so u can get the value easly
0
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 33452359
if ur using css
the u write some class there for changing the color
 
0
 
LVL 1

Author Comment

by:Zoniac
ID: 33452382
without using read only any other way  is there?
0
Industry Leaders: 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!

 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 33452393
is that any pblm using read with CSS ?
0
 
LVL 1

Author Comment

by:Zoniac
ID: 33452407
NO, But using disabled means, it is only one step . so that.....

0
 
LVL 20

Accepted Solution

by:
Sathish David  Kumar N earned 250 total points
ID: 33452451
<input type='text' readonly class='disableColor'..... >
0
 
LVL 40

Expert Comment

by:gurvinder372
ID: 33452494
just enable the textbox before submitting, call this function before submitting

function enableField()
{
document.form1.mailUIAddressEmpSt1.disabled=false;
}

0
 
LVL 1

Author Comment

by:Zoniac
ID: 33452526
OK Thanks, I will accept the solution.
0
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 33452550
for accept u will click accept not delete button
0
 
LVL 1

Author Closing Comment

by:Zoniac
ID: 33452767
I accepted
0

Featured Post

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
some methods private some are not 8 221
servlet concurrency 13 116
caughtSpeeding java challenge 16 140
tomcat startup error 5 135
This article demonstrates probably the easiest way to configure domain-wide tier isolation within Active Directory. If you do not know tier isolation read https://technet.microsoft.com/en-us/windows-server-docs/security/securing-privileged-access/s…
Always backup Domain, SYSVOL etc.using processes according to Microsoft Best Practices. This is meant as a disaster recovery process for small environments that did not implement backup processes and did not run a secondary domain controller that ne…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

763 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