J
jb
Hello, I need to know which button was pressed in the submit , i tried
reading the vaule of submit it the validateDate function but it returns
'undefined' value ; I do this in asp all the time, Not sure how to do it in
javascript
<form name="form1" method="post" action="myNewplace.asp"
ONSUBMIT="return ValidateData();">
<input type="Submit" name="Submit" value="Save" >
<input type="Submit" name="Submit" value="Submit" >
<input type="Submit" name="Submit" value="Cancel" >
...
function ValidateData(Button) {
var CanSubmit = false;
if (document.forms[0].Submit.value=='Cancel') {
return true;
}
...
thanks for your help....
reading the vaule of submit it the validateDate function but it returns
'undefined' value ; I do this in asp all the time, Not sure how to do it in
javascript
<form name="form1" method="post" action="myNewplace.asp"
ONSUBMIT="return ValidateData();">
<input type="Submit" name="Submit" value="Save" >
<input type="Submit" name="Submit" value="Submit" >
<input type="Submit" name="Submit" value="Cancel" >
...
function ValidateData(Button) {
var CanSubmit = false;
if (document.forms[0].Submit.value=='Cancel') {
return true;
}
...
thanks for your help....