V
Varun
Hi There,
I have a form("myRequest.asp") and the values from it are
retrieved into the page ("output_Print.asp") on which I have two
buttons('Save As Complete' and 'Save As Incomplete'). When the 'Save
as Incomplete' button is Clicked the form will be going to the
"SaveAsincomplete.asp" without validation of the fields. And when the
'save as complete' is clicked certain fileds are to be validated and
by the function return value, if false stays in "output_Print.asp"
else, if true, it will taken to saveasComplete.asp.
Problems:
1. After the function returns false the actual values in the
"output_Print.asp" are not retaining as is.
2. The onSubmit() when used in a javaScript function as
(* document.Review.onsubmit= "return requiredCheck(valArray,
keywords, SpecPop, CntrctArray)" is not working the way it should.
Code:
"output_Print.asp"
-------
Code for the form retrieving values and showing as
<HTML>
<BODY>
<FORM method="post" name="Revew">
var1=Request.form("Title")
var2...........
..............
Response.Write "Title:"&var1
...........
..........
......
.....
<input type=submit name="submit complete" value="Save as complete"
onClick="saveComplete('SaveInComplete.asp', this)">
<input type=submit name="Save as Incomplete" value="Save as
Incomplete" onClick="saveInComplete('SaveInComplete.asp')">
<input type=submit name="back" value="Edit Submission"
onclick=""history.back()"">
<Script language=javaScript>
function saveInComplete(var1)
{
document.Review.method ="POST";
document.Review.action=var1;
document.Review.submit();
}
function saveComplete(var1, frmName)
{
var errString="";
var rtnString="";
var valArray, keywords, SpecPop, CntrctArray
valArray=Review.valuesArray.value;
keywords=Review.Keywords.value;
SpecPop=Review.SpecPop.value;
CntrctArray=Review.CntrctArray.value;
document.Review.method ="post";
document.Review.onsubmit= "return requiredCheck(valArray, keywords,
SpecPop, CntrctArray)";
document.Review.action=var1;
document.Review.submit();
}
</script>
</form>
</body>
</html>
When I call the function in the javaScript
( Just like-- var bool=requiredCheck(valArray, keywords, SpecPop,
CntrctArray)" its checking and returning the results correctly.
But when used in "document.Review.onsubmit= "return
requiredCheck(valArray, keywords, SpecPop, CntrctArray)";" I am not
returning (or even the function is not called) any values from the
function.
Any ideas on how to deal with this issue. Or any other method without
using the onsubmit() would be highly appreciated.
Awaiting for your suggestions,
Varun.
I have a form("myRequest.asp") and the values from it are
retrieved into the page ("output_Print.asp") on which I have two
buttons('Save As Complete' and 'Save As Incomplete'). When the 'Save
as Incomplete' button is Clicked the form will be going to the
"SaveAsincomplete.asp" without validation of the fields. And when the
'save as complete' is clicked certain fileds are to be validated and
by the function return value, if false stays in "output_Print.asp"
else, if true, it will taken to saveasComplete.asp.
Problems:
1. After the function returns false the actual values in the
"output_Print.asp" are not retaining as is.
2. The onSubmit() when used in a javaScript function as
(* document.Review.onsubmit= "return requiredCheck(valArray,
keywords, SpecPop, CntrctArray)" is not working the way it should.
Code:
"output_Print.asp"
-------
Code for the form retrieving values and showing as
<HTML>
<BODY>
<FORM method="post" name="Revew">
var1=Request.form("Title")
var2...........
..............
Response.Write "Title:"&var1
...........
..........
......
.....
<input type=submit name="submit complete" value="Save as complete"
onClick="saveComplete('SaveInComplete.asp', this)">
<input type=submit name="Save as Incomplete" value="Save as
Incomplete" onClick="saveInComplete('SaveInComplete.asp')">
<input type=submit name="back" value="Edit Submission"
onclick=""history.back()"">
<Script language=javaScript>
function saveInComplete(var1)
{
document.Review.method ="POST";
document.Review.action=var1;
document.Review.submit();
}
function saveComplete(var1, frmName)
{
var errString="";
var rtnString="";
var valArray, keywords, SpecPop, CntrctArray
valArray=Review.valuesArray.value;
keywords=Review.Keywords.value;
SpecPop=Review.SpecPop.value;
CntrctArray=Review.CntrctArray.value;
document.Review.method ="post";
document.Review.onsubmit= "return requiredCheck(valArray, keywords,
SpecPop, CntrctArray)";
document.Review.action=var1;
document.Review.submit();
}
</script>
</form>
</body>
</html>
When I call the function in the javaScript
( Just like-- var bool=requiredCheck(valArray, keywords, SpecPop,
CntrctArray)" its checking and returning the results correctly.
But when used in "document.Review.onsubmit= "return
requiredCheck(valArray, keywords, SpecPop, CntrctArray)";" I am not
returning (or even the function is not called) any values from the
function.
Any ideas on how to deal with this issue. Or any other method without
using the onsubmit() would be highly appreciated.
Awaiting for your suggestions,
Varun.