Solved

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

Posted on 2010-08-17
10
695 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
Comment Utility
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
Comment Utility
if ur using css
the u write some class there for changing the color
 
0
 
LVL 1

Author Comment

by:Zoniac
Comment Utility
without using read only any other way  is there?
0
 
LVL 20

Expert Comment

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

Author Comment

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

0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 20

Accepted Solution

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

Expert Comment

by:gurvinder372
Comment Utility
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
Comment Utility
OK Thanks, I will accept the solution.
0
 
LVL 20

Expert Comment

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

Author Closing Comment

by:Zoniac
Comment Utility
I accepted
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

HOW TO: Upload an ISO image to a VMware datastore for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere Host Client, and checking its MD5 checksum signature is correct.  It's a good idea to compare checksums, because many installat…
In this article, you will read about the trends across the human resources departments for the upcoming year. Some of them include improving employee experience, adopting new technologies, using HR software to its full extent, and integrating artifi…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

762 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

10 Experts available now in Live!

Get 1:1 Help Now