Solved

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

Posted on 2010-08-17
10
703 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
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!

 
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

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!

Question has a verified solution.

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

This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
There is a lot to be said for protecting yourself and your accounts with 2 factor authentication.  I found to my own chagrin, that there is a big downside as well.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

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