Solved

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

Posted on 2010-08-17
10
699 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
  • 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
Each year, investment in cloud platforms grows more than 20% (https://www.immun.io/hubfs/Immunio_2016/Content/Marketing/Cloud-Security-Report-2016.pdf?submissionGuid=a8d80a00-6fee-4b85-81db-a4e28f681762) as an increasing number of companies begin to…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

810 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