Hello,
How to call a function on form submission.
Thanks
Jump to Postwith javascript, the the function should be written in the head tags.after this you can write your php script and in the body tag include the code
example <body onsubmit="show_warning()"> in this case the show_warning() is a java script functional name, it should be written like this <head> <script type …
with javascript, the the function should be written in the head tags.after this you can write your php script and in the body tag include the code
example <body onsubmit="show_warning()"> in this case the show_warning() is a java script functional name, it should be written like this <head> <script type = "text/javascript">
function show_warning()
{
code
}
</script>
</head>
You could put the handler into the form's action attribute. Body is a bit much maybe.
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.