My app allows the user to update a field via a drop down box using jeditable. When the program is loaded i created this function to get the selected value and set it as the selected value in jeditable.
But after i change the value, the selected tag stays set as the old value. how can i make it change to the new value?
this is the function
function updateType(ID,type){
$(document).ready(function(){
$('#tweekType-'+ID).editable("edit.php?type=tweekType", {
data : " {'copywriting':'Copywriting','design':'Design','code':'Code', 'selected':'"+type+"'}",
type : 'select'
});
});
this is the wrapper around the tag.
<span id="tweekType-<?php echo $getTweaksReturned->tweekID; ?>">
<?php type($getTweaksReturned->type); ?>
<script>updateType('<?php echo $getTweaksReturned->tweekID; ?>','<? echo $getTweaksReturned->type; ?>'); </script>
</span>
The same tag is replicated on the page the returns the new variable.