Reputation: 1023
I have a button. And I have a form that calls celery task. form has url, smth like
http://example.com/export/?user=user123&timedelta=10
I need to submit this form from confirm dialog.
How it should work... In user profile admin presses a button, javascript confirmation appears, admin clicks ok and the form from this url should be submitted. I'm sooo new to javascript and frontend programming. I need your help.
Upvotes: 0
Views: 133
Reputation: 2192
Try this
var r=confirm("Press a button");
if (r==true)
{
//Form is on another page so
window.location="your_url_withquerystring"
}
else
{
}
Upvotes: 0