So I have the submit button that looks like this:
<a href="#" id="submitbutton"
onClick="document.getElementById('UploaderSWF').submit();">
<img src="../images/user/create-product.png" border="0" /></a>
When I double click it double submits obviously, and the problem is that I'm saving the information in the database so I'll have dublicate information there, and I dont want that. This uploader uses flash and javscript and here is a little piece of code that is relevant to the submit thing (if it helps)
$.fn.agileUploaderSubmit = function() {
if($.browser.msie && $.browser.version == '6.0') {
window.document.agileUploaderSWF.submit();
} else {
document.getElementById('agileUploaderSWF').submit();
return false;
}
}
Thank you guys. I appreciate your help. This is really something I was unable to do myself because I have such a little experience with js and I dont really know how to do stuff. THANKS.
Try this snipped:
edit 1
Oh, in your case it is a link and no submit button ...
edit 2
To simplify this, try this:
Use form elements, like
<input type="image" />
, to submit a form not a normal link.This works fine!
Take a look at jQuery.post() to submit your form.
Good luck.
edit 3
This works well for me too:
Hopefully this helps.