I have searched the site and I've found various solutions, most of them suggesting using
return false;
Problem is that I'm using this piece of code to submit the form:
$(function() {
$("#snd").click(function() {
var dendar = "http://" + $("#inpt").val() + ":" + $("#pwd").val() + "secretsite.lol/something.xml";
$("#formen").attr("action", dendar);
$("#formen").submit();
alert(dendar);
return false;
});
});
The alert is just there to let me know that the form has been submitted..
Thanks guys!