Hi all,
I've got a Javascript question 4 ya. Now be easy on me I know nowt about Javascript, so if this is full of errors, I'm sorry...
Anyway, I'm trying to create a function that I can use on every submit button through my website. I want the function to change the value of the submit button and then disable the submit and reset buttons, oh yeah and of course - submit the form. This is what I came up with, and yes it doesn't work, I'm a rookie on Javascript 
This would be the function (that is in a js file which is included to every page):
function submitForm(frmName, btnSubmit, submitValue, btnReset) { document[frmName][btnSubmit]value = [submitValue]; var btnSubmit = document[frmName][btnSubmit] var btnReset = document[frmName][btnReset] btnSubmit.disabled = true; btnReset.disabled = true; document[frmName]submit(); } |
...and this is what would be in the input tag (for the submit button):
onclick="Javascript:submitForm('frmAddPhoto', 'btnAddPhoto', 'Adding Photo to gallery...', 'btnReset');" |
Can somebody please help me, show me what to put where 
Thank you for reading 