Hello,
How to call a function on form submission.

Thanks

Recommended Answers

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 …

Jump to Post

All 2 Replies

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>

Member Avatar

You could put the handler into the form's action attribute. Body is a bit much maybe.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.