Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 72416

using the data in form in a function

$
0
0

So basically I want to take the data in the form and use it in a function.

HTML:

<form id="form1" onsubmit="Ordering()"><input id="X" type="checkbox"><input id="Y" type="checkbox"><input type="submit" value="order"><input type="reset"></form>

Java Script:

function Ordering()
{
	alert("Hello! I am an alert box!!");
	if(document.getElementById('X')==true;)
	{
		action='whatsapp://send?abid=&text=';
	}
	if(document.getElementById('Y')==true;)
	{
	action='ailto:pizza@manheten.co.il?subject=Pizza%20order&body=123';
}

but i cant activate the script at all... i tried to use an alert to see if its even getting there ... but with no success .. any suggestions?


Viewing all articles
Browse latest Browse all 72416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>