Announcement Announcement Module
Collapse
No announcement yet.
<form:input disabled="true"> is blocking the data in the request object Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • <form:input disabled="true"> is blocking the data in the request object

    Hi,

    While using form:input & trying to disable it either by disabled attribute or by js function onchange, it seems to block the data from being sent to the server.

    This is the code:
    Code:
    <form:input							
                 id="input_value_integer" 						
                 title="From line ${increment}" 					
                 privilegeId="<%= Constants.PRIVELEGE.ADM_MANAGE_PRICING %>"	
                 path="defPPLst[${dPPSts.index}].fromBulkLevel"
    	cssClass="forminput" 
    	cssStyle="align:left; "
    	onkeypress="return noEnter(event);"
    	onchange="checkInput(this)"
    	onselect="initInput(this)" 						
                 onfocus="initInput(this)"						
             onmousedown="disableField(this);"		
    />
    Code:
    function disableField(field){
         field.disabled=true;
    }
    How do i disable the field & in the same time able to send it's actual data to the server & back?

    Thanks.

  • #2
    I suggest you read the html specification. Disabled input fields DON'T send the data included READONLY fields do include data in the request. It is clearly explained in the html specification.

    Comment


    • #3
      Hi Martin,

      Thanks for your quick reply. I wasn't aware of the fact that readOnly/disabled input field doesn't send data to the server.

      However, can you supply me with a way to overcome this issue?
      I simply need to disable my form:input field & to be able to use it's data in the server later.

      Thanks!

      Comment


      • #4
        I suggest re-reading my post....

        Disabled input fields DON'T send the data included READONLY fields do include data in the request

        Comment

        Working...
        X