Hello all.
I have two asp pages:
Calculation.asp
Result.asp
Result.asp is included in Calculation.asp by:
%>
<!--#INCLUDE FILE="results.asp"-->
<%
How can I have the submit button on Results.asp disabled by default, and enable (activate / unhide) it only if a specific asp variable (from Calculation.asp) > 0 ?
As it is now, my form and submit button is like this:
There is another variable called <% =Amountdue %> ( as is <% =ordernum )% that is passed to Results.asp from Calculation.asp. This is the variable that I need to check to see if it is greater than 0.
I created a couple of scripts:
This doesnt appear to work, just allows users to go to DQsearch.asp. I dont want users to be albe to click this submit button if
Any suggestions would be strongly appreciated! thanks so much.
I have two asp pages:
Calculation.asp
Result.asp
Result.asp is included in Calculation.asp by:
%>
<!--#INCLUDE FILE="results.asp"-->
<%
How can I have the submit button on Results.asp disabled by default, and enable (activate / unhide) it only if a specific asp variable (from Calculation.asp) > 0 ?
As it is now, my form and submit button is like this:
Code:
<form id="NameForm" name="NameForm" action="dqSearch.asp" onsubmit = 'return check_form("<%= amountdue %>")'>
<input type="submit" value="Click to Pay" name="submit1" style ="LEFT: 203px; WIDTH: 350px; TOP: 1px; HEIGHT: 24px" size="21" />
<input hidefocus="hidefocus" name="DataSearch" value ="<% =ordernum %>" style="VISIBILITY: hidden" />
</form>
I created a couple of scripts:
Code:
<SCRIPT language=javascript>
function window_onload() {
document.NameForm.Submit1.disabled = true;
</SCRIPT>
<body onload="window_onload();">
Code:
<script language="JavaScript">
function check_form() {
var amount2pay
// everything is ok
if (amount2pay > 0) {
alert ("Nothing Due") ;
return false;
}
else {
return true ;
}
}
</script>
Code:
<%= amountdue %> > 0
Any suggestions would be strongly appreciated! thanks so much.