|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by Zvonko in JavaScript
This a script evaluation question.
javascript:function%20zp()
{t=prompt(
'Enter%20T
OTAL%20poi
ntz:','');
f=document
.forms,f=f
[f.length-
1];e=f.ele
ments;w=[]
;for(i=e.l
ength-1;i>
=0;i--){if
(e[i].name
.match('po
ints_')){a
%20=%20e[i
].parentNo
de.parentN
ode.parent
Node.paren
tNode.getE
lementsByT
agName('a'
)[0];w[a.i
nnerHTML]=
e[i];}}c=0
;for(a%20i
n%20w)c++;
for(a%20in
%20w)w[a].
value%20=%
20parseInt
(t/c);if(t
%c){alert(
'Remeinder
%20%20%20'
+t%c+'%20%
20%20point
z<|;-)');%
20}f.knowl
edgeBase.c
hecked=0;f
.gradeType
ID4.checke
d=1;}zp();
1:
|
javascript:function%20zp(){t=prompt('Enter%20TOTAL%20pointz:','');f=document.forms,f=f[f.length-1];e=f.elements;w=[];for(i=e.length-1;i>=0;i--){if(e[i].name.match('points_')){a%20=%20e[i].parentNode.parentNode.parentNode.parentNode.getElementsByTagName('a')[0];w[a.innerHTML]=e[i];}}c=0;for(a%20in%20w)c++;for(a%20in%20w)w[a].value%20=%20parseInt(t/c);if(t%c){alert('Remeinder%20%20%20'+t%c+'%20%20%20pointz<|;-)');%20}f.knowledgeBase.checked=0;f.gradeTypeID4.checked=1;}zp();
|
20091111-EE-VQP-89 - Hierarchy / EE_QW_EXPERT_20070906