Hi I’m not very good at explaining this in the right terms but I’m trying to retrieve the value of a textbox. The textboxes are in a table and each row has one and the id of each is made up of a unique id and a name…
html
<label id="labelref<?php echo $row_list['pp_order_details_id']; ?>" name="labelref<?php echo $row_list['pp_order_details_id']; ?>"></label>
<input type="text" id="save<?php echo $row_list['pp_order_details_id']; ?>" name="saveref<?php echo $row_list['pp_order_details_id']; ?>" style="margin-right:5px;" />
<a href="javascript:saveref('<?php echo $row_list['pp_order_details_id']; ?>');" id="aref<?php echo $row_list['pp_order_details_id']; ?>" style="margin-right:5px;">Save</a>
<label id="errorref<?php echo $row_list['pp_order_details_id']; ?>" style="color:red; margin-right:5px;"></label>
javascript/jquery
function save(order_id) {
var newSaveRef = "saveref"+order_id;
var saveref = $('#newSaveRef').val();
alert(saveref);
}
I want the value of save ref. If this value ($row_list[‘pp_order_details_id’];) is SS16363 then this value (newSaveRef) should be saverefSS16363.
but how do I get the value from the textbox with that ID????
try this one