i have an almost simular problem as posted before.
My first problem has been solved, but now i am trying for 2 hours to solve the next one.
After confirming, my form has to be submitted.
I have a long list of forms, and wit a class forced to a jquery confirmation message.
I can get the name of the used form and data fromthat form (solution provided by one of you!).
The name or id of the form to be sent is stored in a variable. I have tried both: name an id of the form, both dont work in my code?
<script type="text/javascript">
$(".confirm_submit").click( function(){
var confirmteamnaam = $(this).closest("form").find("input[name='teamnaam']").val();
var frmnaam = $(this).closest('form').attr('id');
jConfirm( confirmteamnaam + frmnaam, function(r) {
if(r == true)
{
$(frmnaam).submit(); // this doe not work??
return true;
}
else
return false;
});
return false;
});
In the confirmation text the names are displayed correctly.
Tried it with id and name of the form, both dont submit?
many thanks in advance for any solution!!
You need to make your form selector an id selector:
Edit: you have some excessive querying and crawling going on. Here’s a little bit of a refactor that will cut down on some of that: