title: magento remove edit button and make it editable once we click on textfield
body: <p>we are using following code for Price. we provided <strong>auto update</strong> the price text field using following code.</p>
  
  <p><strong>Phtml</strong></p>
  
  <pre><code>&lt;input class="ama1" type = "text" id = "price_&lt;?php echo $products-&gt;getId(); ?&gt;" onkeydown="validateNumbers(event)" name= "price[]" value = "&lt;?php echo $products-&gt;getPrice(); ?&gt;" style = ""/&gt;
  
  &lt;input type="hidden" name="curr_&lt;?php echo $products-&gt;getId(); ?&gt;" id="curr_&lt;?php echo $products-&gt;getId(); ?&gt;" value="&lt;?php echo $products-&gt;getPrice(); ?&gt;" /&gt;
  
  &lt;p id="updatedprice_&lt;?php echo $products-&gt;getId(); ?&gt;" style = "display:none;color:red; position:relative; top:16px;"&gt;Updated&lt;/p&gt;
  &lt;br/&gt;
  
  &lt;button id="price_update_button_&lt;?php echo $products-&gt;getId(); ?&gt;" class="update" onclick="updateFieldPrice('&lt;?php echo $products-&gt;getId(); ?&gt;'); return false;" &gt;
  &lt;span&gt;&lt;span style="font-size:12px;"&gt;&lt;?php echo $helper-&gt;__('Update') ?&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;/button&gt;
  
  &lt;button id="price_reset_button_&lt;?php echo $products-&gt;getId(); ?&gt;" type="reset" class="cancel" onclick="hideResetPrice('&lt;?php echo $products-&gt;getId(); ?&gt;','&lt;?php echo $products-&gt;getPrice(); ?&gt;'); return false;"&gt;
  &lt;span&gt;&lt;span&gt;&lt;?php echo $helper-&gt;__('Cancel') ?&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;/button&gt;
  </code></pre>
  
  <p><strong>JS</strong></p>
  
  <pre><code>&lt;script&gt;
  
  function hideResetPrice(product_id,priceold) { 
  
  var qtyId='#price_'+ product_id; 
  var currprice='#curr_'+ product_id; 
  var editLink="#price_edit_link_"+ product_id; 
  var updateButton="#price_update_button_"+ product_id; 
  var valueprice="#valueprice_"+ product_id; 
  var resetButton="#price_reset_button_"+ product_id; 
  
  
  $wk_jq(valueprice).show(); 
  $wk_jq(qtyId).val( $wk_jq(currprice).val()); 
  $wk_jq(editLink).show(); 
  
  }
  
  
  
  function showFieldPrice(product_id)
          {
  
              var qtyId='#price_'+ product_id;
  
              var editLink="#price_edit_link_"+ product_id;
              var valueprice="#valueprice_"+ product_id;
              var updateButton="#price_update_button_"+ product_id;
              var resetButton="#price_reset_button_"+ product_id;
  
              $wk_jq(qtyId).show();
              $wk_jq(valueprice).hide();
  
              $wk_jq(editLink).hide();
              $wk_jq(updateButton).show();
              $wk_jq(updateButton).prop('disabled', false);//just in case
              $wk_jq(resetButton).show();
  
              return false;
  
  
          }
  
  
  function updateFieldPrice(product_id) 
  { 
  var priceId = '#price_'+ product_id; 
  var currprice='#curr_'+ product_id; 
  var updatedqty = '#updatedprice_'+ product_id; 
  var url ='&lt;?php echo Mage::getUrl('marketplace/marketplaceaccount/updateFieldPrice/')?&gt;'; 
  $price = $wk_jq(priceId).val(); 
  $wk_jq(currprice).val($price); 
  new Ajax.Request(url, { 
  method: 'post', 
  parameters: {id: product_id, price: $price}, 
  onComplete: function (transport) { 
  //alert(transport.responseText); 
  
  jQuery(updatedqty).show().delay(2000).fadeOut(); 
  
  } 
  }); 
  }
  </code></pre>
  
  <p></p>
  
  <p>its displaying as like this : <a href="https://i.stack.imgur.com/v9gpX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v9gpX.png" alt="enter image description here"></a></p>
  
  <p>in the same way we are using following code for quantity. but its displaying like this . i want to <strong>remove edit button from quantity and want to display as like price</strong>
  <a href="https://i.stack.imgur.com/Bd7O0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Bd7O0.png" alt="enter image description here"></a></p>
  
  <p>This is code for quantity</p>
  
  <p><strong>Phtml</strong></p>
  
  <pre><code>$selllermpassignproduct=Mage::getModel('mpassignproduct/mpassignproduct')-&gt;getAssignProDetails($products-&gt;getId());
  //Zend_Debug::dump($selllermpassignproduct,null,true);
  $stock_item=Mage::getModel('cataloginventory/stock_item')-&gt;loadByProduct($products);
  
  $SellerQty=isset($selllermpassignproduct['sellerqty'])?$selllermpassignproduct['sellerqty']:$stock_item-&gt;getQty();
  $assignqty=isset($selllermpassignproduct['assignqty'])?$selllermpassignproduct['assignqty']:0;
  ?&gt;
  
  &lt;span id="valueqty_&lt;?php echo $products-&gt;getId(); ?&gt;"&gt;&lt;?php echo (int) $SellerQty; ?&gt;&lt;/span&gt;
  &lt;input type = "text" id = "qty_&lt;?php echo $products-&gt;getId(); ?&gt;" onkeydown="validateNumbers(event)" name = "stock" value = "&lt;?php echo (int) $SellerQty; ?&gt;" style = "display:none"/&gt;
  
  
  
  &lt;span class="label wk_action" id="edit_link_&lt;?php echo $products-&gt;getId(); ?&gt;"&gt;
  &lt;img onclick="showField('&lt;?php echo $products-&gt;getId(); ?&gt;'); return false;" src="&lt;?php echo $this-&gt;getSkinUrl('marketplace/images/icon-edit.png'); ?&gt;"/&gt;
  &lt;/span&gt;  
  
  &lt;p id="updatedqty_&lt;?php echo $products-&gt;getId(); ?&gt;" style = "display:none;color:red;"&gt;Updated&lt;/p&gt;
  &lt;br/&gt;
  
  
  &lt;button id="update_button_&lt;?php echo $products-&gt;getId(); ?&gt;" class="button wk_mp_btn1" onclick="updateField('&lt;?php echo $products-&gt;getId(); ?&gt;',&lt;?php echo $assignqty;?&gt;); return false;" style="display:none" &gt;
  &lt;span&gt;&lt;span style="font-size:12px;"&gt;&lt;?php echo $helper-&gt;__('Update') ?&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;/button&gt;
  
  &lt;button id="reset_button_&lt;?php echo $products-&gt;getId(); ?&gt;" type="reset" class="cancel" onclick="hideReset('&lt;?php echo $products-&gt;getId(); ?&gt;'); return false;" style="display:none" &gt;
  &lt;span&gt;&lt;span&gt;&lt;?php echo $helper-&gt;__('Cancel') ?&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;/button&gt;
  </code></pre>
  
  <p><strong>JS</strong></p>
  
  <pre><code>function hideReset(product_id) {
  
              var qtyId='#qty_'+ product_id;
              var editLink="#edit_link_"+ product_id;
              var updateButton="#update_button_"+ product_id;
              var resetButton="#reset_button_"+ product_id;
  
              $wk_jq(qtyId).hide();
              $wk_jq(editLink).show();
              $wk_jq(updateButton).hide();
              $wk_jq(resetButton).hide();
          }
  
  function showField(product_id)
          {
  
              var qtyId='#qty_'+ product_id;
  
              var editLink="#edit_link_"+ product_id;
              var updateButton="#update_button_"+ product_id;
              var resetButton="#reset_button_"+ product_id;
  
              $wk_jq(qtyId).show();
  
              $wk_jq(editLink).hide();
              $wk_jq(updateButton).show();
              $wk_jq(updateButton).prop('disabled', false);//just in case
              $wk_jq(resetButton).show();
  
              return false;
  
  
          }
  
  function updateField(product_id,assignqty)
          {
              var qtyId = '#qty_'+ product_id;
              var valueId = '#valueqty_'+ product_id;
              var updatedqty = '#updatedqty_'+ product_id;
  
  
              var editLink = "#edit_link_"+ product_id;
              var updateButton = "#update_button_"+ product_id;
              var resetButton = "#reset_button"+ product_id;
              var url ='&lt;?php echo Mage::getUrl('marketplace/marketplaceaccount/updateField/')?&gt;';
  
              $wk_jq(qtyId).toggle()
  
              $wk_jq(editLink).hide();
              $wk_jq(updateButton).show();
              $wk_jq(resetButton).show();
  
              $qty = $wk_jq(qtyId).val();
              jQuery(valueId).html($qty);
              hideReset(product_id);
  
              var tmpQty=assignqty+ parseInt($qty) ;
  
              new Ajax.Request(url, {
                  method: 'post',
                  parameters: {id: product_id, qty: tmpQty},
                  onComplete: function (transport) {
                      //alert(transport.responseText);
                      jQuery(priceId).val($price);
              // $wk_jq(priceId).setValue($price);
  
                      jQuery(updatedqty).show().delay(2000).fadeOut();
  
                      $updateButton.prop('disabled', false);
  
                      // $wk_jq(qtyId).setValue($qty);
  
  
  
                  }
              });
          }
  </code></pre>