Closed Thread Icon

Topic awaiting preservation: Problem with netscape :( (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8549" title="Pages that link to Topic awaiting preservation: Problem with netscape :( (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Problem with netscape :( <span class="small">(Page 1 of 1)</span>\

 
Robz
Obsessive-Compulsive (I) Inmate

From: Montreal, Qc, CA
Insane since: Feb 2003

posted posted 02-24-2003 17:34

Can anyone tell me why my code doent wok in netscape 4 (dont tell me ist because netscrap sucks, I know) !?

<script LANGUAGE="JavaScript">
function floor(number){return Math.floor(number*Math.pow(10,2))/Math.pow(10,2);}
function dosum()
{
var mi = document.temps.IR.value / 1200;
var base = 1;
var mbase = 1 + mi;
for (i=0; i<document.temps.YR.value * 12; i++)
{
base = base * mbase
}
document.temps.PI.value = floor((document.temps.LA.value-document.temps.CD.value) * mi / ( 1 - (1/base)))
document.temps.MT.value = floor(document.temps.AT.value / 12)
document.temps.MI.value = floor(document.temps.AI.value / 12)
var dasum = (document.temps.LA.value-document.temps.CD.value) * mi / ( 1 - (1/base)) +
document.temps.AT.value / 12 +
document.temps.AI.value / 12;
document.temps.MP.value = floor(dasum);
}
</script>

Robz

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 02-24-2003 17:52

...because Netscape doesn't recognize "document.temps." as valid...

... If you're going to hang here, at least try to spell properly...


Code - CGI - links - DHTML - Javascript - Perl - programming - Magic - http://www.twistedport.com
ICQ: 67751342

Yossi Admon
Bipolar (III) Inmate

From: Israel
Insane since: Nov 2001

posted posted 02-24-2003 18:06

It looks fine.
I have tryied with the following code:
<html>
<script LANGUAGE="JavaScript">
function floor(number){
return Math.floor(number*Math.pow(10,2))/Math.pow(10,2);
}
function dosum(){
var mi = document.temps.IR.value / 1200;
var base = 1;
var mbase = 1 + mi;
for (i=0; i<document.temps.YR.value * 12; i++){
base = base * mbase
}

document.temps.PI.value = floor((document.temps.LA.value-document.temps.CD.value) * mi / ( 1 - (1/base)))
document.temps.MT.value = floor(document.temps.AT.value / 12)
document.temps.MI.value = floor(document.temps.AI.value / 12)
var dasum = (document.temps.LA.value-document.temps.CD.value) * mi / ( 1 - (1/base)) +
document.temps.AT.value / 12 +
document.temps.AI.value / 12;
document.temps.MP.value = floor(dasum);
}
</script>
<body>
<form name="temps">
AT<input disabled type=text name=AT value="10"> AI<input type=text name=AI value="10"> LA<input type=text name=LA value="10"> CD<input type=text name=CD value="10"> YR<input type=text name=YR value="10"> IR<input type=text name=IR value="10"><input type=button value="Test" onClick="dosum()"><BR>

PI<input disabled type=text name=PI value=""><BR>
MT<input disabled type=text name=MT value=""><BR>
MI<input disabled type=text name=MI value=""><BR>
MP<input disabled type=text name=MP value=""><BR>
</form>
<body>
</html>

Maybe the HTML code is bad?
try to type "javascript:" on the browser's address bar and press enter you will see all javascript errors occurred while running the page.

trib
Paranoid (IV) Inmate

From: Den Haag, Netherlands
Insane since: Sep 2002

posted posted 02-24-2003 18:14

You wouldn't happen tp be http://www.gonodown.com/ would you ?? (Looks like a typical spammers landing site to me, though it might be a legitimate mortgage business) ... Anyway, if it's not your site, then that site also seems to have an uncannily similar problem with (surprise) an identical piece of code ... on the mortgage calculator page ... http://www.gonodown.com/mortgage%20calculator%20BW.htm

Since it's also obviously not what you say it is .. i.e. YOUR code ... then perhaps you ought to just go back to the supplier of the code and ask them to fix it ... eh??



[This message has been edited by trib (edited 02-24-2003).]

« BackwardsOnwards »

Show Forum Drop Down Menu