R
ramgaikwad
<script>
function checkFormStatus(oForm)
{
if(isDirty(oForm))
//event.returnValue = "You have entered form Data without
submitting this form.";
{
alert("You have entered form Data without submitting this
form.");
}
else { return true;}
}
var bSubmitted=false;
function isDirty(oForm)
{
if(bSubmitted) return false;
/*var iNumElems = oForm.elements.length;
for (var i=0;i<iNumElems;i++)
{
var oElem = oForm.elements;
if ("text" == oElem.type)
{
if (oElem.value != oElem.defaultValue) return true;
}
}*/
var str;
str=window.document.URL;
str=str.toLowerCase();
if(str.indexOf("orderstatus") > 0)
{
window.self.location.href="http:\\arun54\rameshwargspc\dotedit
\testPrintablePDF.asp";
return false;
}
else
{
return true;
}
}
</script>
<body bgcolor="E6EAF2"
onbeforeunload="javaScript:if(checkFormStatus(document.forms[0]));">
function checkFormStatus(oForm)
{
if(isDirty(oForm))
//event.returnValue = "You have entered form Data without
submitting this form.";
{
alert("You have entered form Data without submitting this
form.");
}
else { return true;}
}
var bSubmitted=false;
function isDirty(oForm)
{
if(bSubmitted) return false;
/*var iNumElems = oForm.elements.length;
for (var i=0;i<iNumElems;i++)
{
var oElem = oForm.elements;
if ("text" == oElem.type)
{
if (oElem.value != oElem.defaultValue) return true;
}
}*/
var str;
str=window.document.URL;
str=str.toLowerCase();
if(str.indexOf("orderstatus") > 0)
{
window.self.location.href="http:\\arun54\rameshwargspc\dotedit
\testPrintablePDF.asp";
return false;
}
else
{
return true;
}
}
</script>
<body bgcolor="E6EAF2"
onbeforeunload="javaScript:if(checkFormStatus(document.forms[0]));">