Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
function Update()
{
if (confirm("This will update the changes! Are you sure you want to do this?"))
{
document.forms[0].action = "update.asp";
document.forms[0].submit();
}
}
Well, normally nothing should happen. JavaScript is case sensitive, so you are calling an undefined function.cumap said:OnClick="[red]u[/red]pdate();"
function [red]U[/red]pdate()
Sorry, but the best I can say is "WTF" ?cumap said:I realized the problem is that forms[0] does not automatically understand my form name, so to fix the problem, I assigned the form name to it and it works now
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "[URL unfurl="true"]http://www.w3.org/TR/html4/strict.dtd">[/URL]
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title></title>
<script type="text/javascript">
function Update()
{
if (confirm("This will update the changes! Are you sure you want to do this?"))
{
document.forms[0].action = "update.asp";
document.forms[0].submit();
}
}
</script>
</head>
<body>
<form action="#">
<p>
<input type="button" onclick="Update()">
</p>
</form>
</body>
</html>