A problem with syntax or something else …?
Hello, have just joined today and hope that this is the kind of question that is appropriate???
1) Wish to add a small script to verify a required field/create a special alert message
2) Action is triggered by “Submit” and onClick e.g.
<input type=button value=”Click here to finalise your order” onclick=”verify();”>
Problem:
“Submit” and onClick already refers to another function e.g.
<input type=button value=”Click here to finalise your order” onclick=” WriteCustInfo();”>
3) Is there a way, please, of triggering both “verify();” and “WriteCustInfo();” from the same input, submit, onClick=?
- is it a question of syntax?
- is there a simple way around this?
- is this simply not possible?
Many thanks for your help.
Happy Christmas
Denis
'A problem with syntax or something else ?'
Steven,
Thank you very much that is most helpful. The return string in WriteCustInfo you suggest works. Unfortunately, an alert relating to function CheckValidAmount() is now no longer functional.
As an alternative, I attempted "mySubmitAction()". Due to very limited knowledge, I probably got the syntax all wrong/didn’t know where to put it etc? This is what I tried:
<script language="JavaScript">
function mySubmitAction()
onClick="WriteCustInfo()"
onClick="Validate()"
}
</script>
What is the best way, please, of ensuring that both alerts function? It would also be helpful to know how to write “mySubmitAction()” correctly. Any explanations of errors would be particularly helpful, as I am an absolute beginner. Thanks for your patience.
Very many thanks.
Denis
'A problem with syntax or something else ?'
Steve,
Thanks for this - worked a treat! Your explanations were most helpful too!
Happy Christmas,
Denis