...

View Full Version : form wont post



idalatob
01-20-2009, 03:16 PM
Any idea why it wont post?



function submitForm(){
document.all.edit_student.submit();
}


THE FORM STUFF:



<form name="edit_student" action="edit-student.php?sid=<?php echo($sid); ?>" method="post" enctype="multipart/form-data">


THE BUTTON THAT FAILS:


<a href="#" onClick="javascript: submitForm();">Quick Edit</a>

Sorry about poorly written message, just in a hurry to get home and this little glitch is agonizing!!

shyam
01-20-2009, 03:22 PM
try using

function submitForm(){
document.edit_student.submit();
}
<a href="#" onClick="submitForm()">Quick Edit</a>

idalatob
01-21-2009, 08:17 AM
Doesnt work either.... tried a whole host of different functions... Just refuses to post, im at my wits end.

abduraooft
01-21-2009, 08:40 AM
You probably have an input element having name="submit". If so, you'd need to rename it it and make all necessary changes in your other parts of your code.
Though, I'd recommend the use of an input element having type="submit" instead of an anchor and a javascript code to submit your form. (Then you could adopt some Progressive Enhancement (http://en.wikipedia.org/wiki/Progressive_Enhancement))

idalatob
01-21-2009, 10:37 AM
Thanks abdura.

I had a form with: <input type="submit" name="submit">

It is a long form so I just wanted the user to have an opportunity to submit at various stages of form completion.

abduraooft
01-21-2009, 11:03 AM
It is a long form so I just wanted the user to have an opportunity to submit at various stages of form completion. So what? Couldn't you just duplicate your submit button, wherever required?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum