ca-pca.fr - The second function linked on "Change" event does nothing.

RESOLVED WORKSFORME

Status

Tech Evangelism Graveyard
French
RESOLVED WORKSFORME
15 years ago
3 years ago

People

(Reporter: delance, Unassigned)

Tracking

Details

(Whiteboard: [bug248549notfixed], URL)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5a) Gecko/20030718
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5a) Gecko/20030718

Enter 3 in « taux de crédit » box. Nothing happens.
Work under IE, but same problem under Opera.
Perhaps code based on I.E. behavior.

On source, I see :
<input type=text name="tclient"
OnChange="javascript:validnum(this,0,20);calculepargne(this.form);" size="4" >

validnum works, not calculepargne
								

Reproducible: Always

Steps to Reproduce:
1.Enter 3 in « taux de crédit » box.
2.Enter "return".
3.

Actual Results:  
Nothing.

Expected Results:  
  Résultat de la simulation
 
Montant total possible : 10400 euros
Echéance : 100,42 euros
Nombre d'échéances : 120 mois

Comment 1

15 years ago
The function being called is coded:

function calculepargne(form) {
	var capa  = parseInt(form.capacite.options[form.capacite.selectedIndex].value);
	    t     = parseFloat(form.tclient.value)/(100 * 12);
	var ans = parseInt(form.durans.options[form.durans.selectedIndex].value);
	ntot = parseInt(ans * 12);
        capi = Math.round(capa * (Math.pow((1+t),ntot) - 1) / (100 * t *
Math.pow((1+t),ntot))) * 100; 
	eche = calculecheance(capi, t, ntot); 
	genererResult(fix(capi, 0, ","), fix(eche, 2, ","), ntot, fix(calculteg(t),3, ","))
	devise = 'Euros';
	}

I think the references to "form." should be "document.form."

Not a JS Engine bug.
->B-G for triage
Assignee: rogerl → general
Component: JavaScript Engine → Browser-General
QA Contact: pschwartau → general
> I think the references to "form." should be "document.form."

Why?  "form" is the argument passed to the method...

The real issue is that genererResult does the following:

	footerInit(resultSimul);

Which does:

function footerInit (resultat) {
        if (VERSION4) {
           // do something
        } // else do nothing
}

and we have:

NS4 = (document.layers) ? 1 : 0;
IE4 = (document.all) ? 1 : 0;
VERSION4 = (NS4|IE4) ? 1 : 0;

Oops.  The page is carefully designed to only work in IE and Netscape 4 or
browsers that are pretending to be one of them very hard.
Assignee: general → french
Status: UNCONFIRMED → NEW
Component: Browser-General → French
Ever confirmed: true
Product: Browser → Tech Evangelism
QA Contact: general → french
Version: Trunk → unspecified

Updated

14 years ago
OS: Windows XP → All
Hardware: PC → All
Summary: The second function linked on "Change" event does nothing. → ca-pca.fr - The second function linked on "Change" event does nothing.

Updated

14 years ago
Whiteboard: [bug248549notfixed]

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WORKSFORME
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.