Jquery Onclick Change Hidden Parameter And Submit
Hi i'm using php and jquery. I have create dinamically a list of a div like that
Copy
Your form is within <script>
tag, Place it outside of <script>
tag.
and write following code within DOM ready like follwing:
<scripttype="text/javascript">
$(function() {
// after DOM ready
$('.divclass').click(function(){
var idarray = $(this).attr("id"); // or this.id do the same thing
$('#testo').val(idarray); // set value to testo
$("form#prova").submit(); // submit the form
});
});
</script>
Post a Comment for "Jquery Onclick Change Hidden Parameter And Submit"