PDA

View Full Version : i got a JavaScript problem



hiksa
07-06-2007, 06:48 AM
Hey peaople can anyone of you tell me how to make "auto-submit" function.
I want to submit my information without clicking the "submit" button. Is there is a command to do that for me. if someone tell me that, he will help so much.
please write at hiksaa@gmail.com if you apply and example, you really will be priceless

thank you!

codeexploiter
07-06-2007, 08:14 AM
<script type="text/javascript">
function submitform()
{
document.formName.submit(); //use your form name instead of formName
}
</script>


You can insert the above function in your <head> section. Make a call to that function when you need to submit the form.

Twey
07-06-2007, 09:06 AM
Ouch. Don't rely on forms being available as properties of document; use the forms collection:
function submitForm() {
document.forms['fromName'].submit();
}

hiksa
07-09-2007, 09:25 AM
hey, really thank you for this! :)