I have an ASP script that loads with initial values for several different fields for a Javascript calculator. It is set up so when a visitor clicks the 'Calculate' button, it submits the results via e-mail then reloads the same page. I can get it to enter the visitor's values in textboxes that are empty, but the default values in the external .js file are replacing what the visitor enters, so they can't see the calculation.

Here's an example of the code I'm using:

.js file:



code:--------------------------------------------------------------------------------
function initialValues(){
document.costForm.Week.value="4.00"
}
--------------------------------------------------------------------------------


.asp file:


code:--------------------------------------------------------------------------------
TOP
<%
Week2=request.form("Week")
%>

INSIDE HTML
<input type="text" name="Week" style="text-align:right;" size="5" value="<%=Week2%>">--------------------------------------------------------------------------------


Can somebody tell me how I can make the Javascript so it won't replace the value the visitor entered if the number is different from the initial value?

Something like:

detect if the value is 4.00

if so enter initial value

if not do not enter initial value


Any help would be greatly appreciated.