Ir para conteúdo
Fórum Script Brasil
  • 0

Dúvidas com parametro de função


Guilherme Teixeira

Pergunta

Pessoal bom dia!

Eu não manjo muito de java mas me ajudem no seguinte:

Tenho varios formularios gerados por um While no asp, eu os diferenciam pelo código da pessoa. Dai eu precisava, somar o valores de alguns e exibir o resultado em um outro campo, todos também diferenciados pelo código da pessoa.

Tentei passar por parametro. MAs algo esta errado. alguém saberia o que?

function calcula(id) 
{

nota = (form+id+.ps+id+.value.replace(",",".")*1) + (form+id+.p1+id+.value.replace(",",".")*1) + (form+id+.p2+id+.value.replace(",",".")*1) + (form+id+.p3+id+.value.replace(",",".")*1) + (form+id+.tp+id+.value.replace(",",".")*1) + (form+id+.tr+id+.value.replace(",",".")*1)

if (isNaN(nota)== true) {

form+id+.mp+id+.value = "#ERRO#";

}
else {

nota = nota.toString();

form+id+.mp+id+.value = nota.replace(".",",");

}

}
Chamo da seguinte forma -> calcula('<%=alunos("idAlunos")%>') Abaixo esta o codigo em HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>::: SUNCD ::: Centro de Educação Meu Caminho</title>
<link rel="stylesheet" type="text/css" href="includes/estilos.css"/>
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
//-->
</script>
<script> 
function calcula(id) 
{

nota = (form+id+.ps+id+.value.replace(",",".")*1) + (form+id+.p1+id+.value.replace(",",".")*1) + (form+id+.p2+id+.value.replace(",",".")*1) + (form+id+.p3+id+.value.replace(",",".")*1) + (form+id+.tp+id+.value.replace(",",".")*1) + (form+id+.tr+id+.value.replace(",",".")*1)

if (isNaN(nota)== true) {

form+id+.mp+id+.value = "#ERRO#";

}
else {

nota = nota.toString();

form+id+.mp+id+.value = nota.replace(".",",");

}

}
</script>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
</head>

<body>
<p><img src="arquivos/logo.jpg" width="120" height="90" class="imagemtopo" /></p>
<p><span class="titulo">SUNCD - Sistema Unificado de Notas e Conteúdos Diários</span></p>
<p>Centro de Educação Meu Caminho</p>
<p> </p>
<div class="barrasuperior">Olá Jaqueline Marcondes Fuliaro, seja bem-vindo(a).
Domingo, 14 de Mar&ccedil;o de 2010
 | <a href="logout.asp">SAIR</a>  </div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="200" valign="top" bgcolor="#DADADC"><p style="background-color:#CCC"><strong>- ROTINAS</strong></p>

<p>
      <strong>Educação Infantil</strong><br />
    
    <ul>
    
    <li><a href="conteudos.asp?Serie=1"><a href="conteudos.asp?Serie=1">
      Maternal I - A</a>
  </li>
    
    <li><a href="conteudos.asp?Serie=3"><a href="conteudos.asp?Serie=3">
      Maternal I - B</a>

  </li>
    
    <li><a href="conteudos.asp?Serie=4"><a href="conteudos.asp?Serie=4">
      Maternal I - C</a>
  </li>
    
    <li><a href="conteudos.asp?Serie=2"><a href="conteudos.asp?Serie=2">
      Maternal II - A</a>
  </li>
    
    <li><a href="conteudos.asp?Serie=5"><a href="conteudos.asp?Serie=5">

      Nível I - A</a>
  </li>
    
    <li><a href="conteudos.asp?Serie=7"><a href="conteudos.asp?Serie=7">
      Nível I - B</a>
  </li>
    
    <li><a href="conteudos.asp?Serie=6"><a href="conteudos.asp?Serie=6">
      Nível II - A</a>

  </li>
    
    <li><a href="conteudos.asp?Serie=8"><a href="conteudos.asp?Serie=8">
      Nível II - B</a>
  </li>
    
    </ul>
    
      <strong>Ensino Fundamental I</strong><br />
    
    <ul>
    
    <li><a href="conteudos.asp?Serie=9"><a href="conteudos.asp?Serie=9">

      1º Ano - A</a>
  </li>
    
    <li><a href="conteudos.asp?Serie=10"><a href="conteudos.asp?Serie=10">
      1º Ano - B</a>
  </li>
    
    <li><a href="conteudos.asp?Serie=11"><a href="conteudos.asp?Serie=11">
      2º Ano - A</a>

  </li>
    
    <li><a href="conteudos.asp?Serie=12"><a href="conteudos.asp?Serie=12">
      
      <strong>
      3º Ano - A
      </strong>
      </a>
  </li>
    
    <li><a href="conteudos.asp?Serie=13"><a href="conteudos.asp?Serie=13">
      3º Ano - B</a>

  </li>
    
    <li><a href="conteudos.asp?Serie=14"><a href="conteudos.asp?Serie=14">
      4º Ano - A</a>
  </li>
    
    <li><a href="conteudos.asp?Serie=15"><a href="conteudos.asp?Serie=15">
      4º Ano - B</a>
  </li>
    
    <li><a href="conteudos.asp?Serie=16"><a href="conteudos.asp?Serie=16">

      5º Ano - A</a>
  </li>
    
    <li><a href="conteudos.asp?Serie=17"><a href="conteudos.asp?Serie=17">
      5º Ano - B</a>
  </li>
    
    </ul>
    
      <strong>Ensino Fundamental II</strong><br />

    
    <ul>
    
    <li><a href="conteudos.asp?Serie=18"><a href="conteudos.asp?Serie=18">
      6º Ano - A</a>
  </li>
    
    <li><a href="conteudos.asp?Serie=19"><a href="conteudos.asp?Serie=19">
      7º Ano - A</a>
  </li>
    
    <li><a href="conteudos.asp?Serie=20"><a href="conteudos.asp?Serie=20">

      8º Ano - A</a>
  </li>
    
    <li><a href="conteudos.asp?Serie=21"><a href="conteudos.asp?Serie=21">
      9º Ano - A</a>
  </li>
    
    </ul>
    
      <strong>Ensino Médio</strong><br />

    
    <ul>
    
    <li><a href="conteudos.asp?Serie=22"><a href="conteudos.asp?Serie=22">
      1º Ano Ensino Médio</a>
  </li>
    
    <li><a href="conteudos.asp?Serie=23"><a href="conteudos.asp?Serie=23">
      2º Ano Ensino Médio</a>
  </li>
    
    </ul>

    
    </p>
<p style="background-color:#CCC"><strong>- CONFIGURAÇÕES</strong></p>
<ul>
  <li>Séries</li>
  <li>Matérias</li>
  <li>Ensinos</li>
  <li>Tipos de Ocorrências</li>

  <li>Usuários</li>
  <li>Professores</li>
  <li><a href="materiasserie.asp">Matérias por ano</a></li>
</ul> 
<p style="background-color:#CCC"><strong>- CONTEÚDO PÚBLICO</strong></p>
<ul>
  <li><a href="noticias.asp">Notícias</a></li>
  <li><a href="galerias.asp">Galerias de Fotos</a></li>

</ul>
</ul>
<p> </p></td>
    <td align="center" valign="top"><p><span class="erro"><br />
</span><span class="titulo">3º Ano - A</span></p>
      <form id="form1" name="form1" method="post" action="">
        <table border="0" cellpadding="2">
          <tr>
            <td align="right" valign="middle"><strong>Matéria:</strong></td>
            <td align="left" valign="middle"><label>

      <select name="materia" id="materia">
        
        <option value="1">Música</option>
        
        <option value="2">Inglês</option>
        
        <option value="3">Português</option>
        
        <option value="4">História</option>
        
        <option value="5">Geografia</option>

        
        <option value="6">Arte</option>
        
        <option value="7">Educação Física</option>
        
        <option value="8">Matemática</option>
        
        <option value="9">Ciências Sociais</option>
        
        <option value="10">Ciências</option>
        
        <option value="11">Informática</option>

        
      </select>
    </label></td>
          </tr>
          <tr>
            <td align="right" valign="middle"><strong>Bimestre:</strong></td>
            <td align="left" valign="middle"><label>
              <select name="bimestre" id="bimestre">
                <option value="1">1º Bimestre</option>

                <option value="2">2º Bimestre</option>
                <option value="3">3º Bimestre</option>
                <option value="4">4º Bimestre</option>
              </select>
            </label></td>
          </tr>
          <tr>

            <td colspan="2" align="center" valign="middle"><input type="submit" name="button" id="button" value="OK" /></td>
          </tr>
        </table>
      </form>      
    
      <table width="98%" border="0" cellpadding="3" cellspacing="0">
        
        <tr>
          <td colspan="2" align="center"> </td>
          <td align="center" class="linhaesquerda linhatopo"><strong>PS</strong></td>
          <td align="center" class="linhaesquerda linhatopo"><label>

            <input type="checkbox" name="checkbox6" id="checkbox6" />
          </label></td>
          <td align="center" class="linhaesquerda linhatopo"><strong>P1</strong></td>
          <td align="center" class="linhaesquerda linhatopo"><input type="checkbox" name="checkbox7" id="checkbox7" /></td>
          <td align="center" class="linhaesquerda linhatopo"><strong>P2</strong></td>
          <td align="center" class="linhaesquerda linhatopo"><input type="checkbox" name="checkbox8" id="checkbox8" /></td>
          <td align="center" class="linhaesquerda linhatopo"><strong>P3</strong></td>

          <td align="center" class="linhaesquerda linhatopo"><input type="checkbox" name="checkbox9" id="checkbox9" /></td>
          <td align="center" class="linhaesquerda linhatopo"><strong>TP</strong></td>
          <td align="center" class="linhaesquerda linhatopo"><input type="checkbox" name="checkbox10" id="checkbox10" /></td>
          <td align="center" class="linhaesquerda linhatopo"><strong>TR</strong></td>
          <td align="center" class="linhaesquerda linhatopo"><input type="checkbox" name="checkbox11" id="checkbox11" /></td>
          <td align="center" class="linhaesquerda linhatopo"><strong>MP</strong></td>
          <td align="center" class="linhaesquerda linhatopo"><strong>NA</strong></td>

          <td align="center" class="linhaesquerda linhatopo"><input type="checkbox" name="checkbox14" id="checkbox14" /></td>
          <td align="center" class="linhaesquerda linhatopo"><strong>RB</strong></td>
          <td align="center" class="linhaesquerda linhatopo"><input type="checkbox" name="checkbox13" id="checkbox13" /></td>
          <td align="center" class="linhaesquerda linhatopo"><strong>MF</strong></td>
        </tr>
        
        <form id="form165" name="form165" method="post" action="">
          <tr >
            <td colspan="2" class="linhatopo linhaesquerda"><a href="detalhealuno.asp?aid=165&amp;Serie=12">Ana Luisa Ferreira Pereira</a></td>

            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield1165">
            <label>
            <input name="ps165" type="text" id="ps165" onblur="calcula('165')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield2165">
            <label>
            <input name="p1165" type="text" id="p1165" onblur="calcula('165')" value="0,0" size="5" />
            </label>

            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield3165">
            <label>
            <input name="p2165" type="text" id="p2165" onblur="calcula('165')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield4165">
            <label>
            <input name="p3165" type="text" id="p3165" onblur="calcula('165')" value="0,0" size="5" />

            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield5165">
            <label>
            <input name="tp165" type="text" id="tp165" onblur="calcula('165')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield6165">
            <label>

            <input name="tr165" type="text" id="tr165" onblur="calcula('165')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td align="center" valign="middle" class="linhatopo linhaesquerda"><label>
              <input name="mp165" type="text" id="mp165" size="8" readonly="readonly"/>
            </label></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield7165">
            <label>
            <input name="na165" type="text" id="na165" onblur="calcula('165')" value="0,0" size="5" />

            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield8165">
            <label>
            <input name="rb165" type="text" id="rb165" onblur="calcula('165')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td align="center" valign="middle" class="linhatopo linhaesquerda"><input name="mf165" type="text" id="mf165" size="8" readonly="readonly" /></td>
          </tr>

        </form>
        
        <form id="form166" name="form166" method="post" action="">
          <tr  bgcolor="#E6E6E6" >
            <td colspan="2" class="linhatopo linhaesquerda"><a href="detalhealuno.asp?aid=166&amp;Serie=12">Isabela Bastos Deolindo</a></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield1166">
            <label>
            <input name="ps166" type="text" id="ps166" onblur="calcula('166')" value="0,0" size="5" />
            </label>

            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield2166">
            <label>
            <input name="p1166" type="text" id="p1166" onblur="calcula('166')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield3166">
            <label>
            <input name="p2166" type="text" id="p2166" onblur="calcula('166')" value="0,0" size="5" />

            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield4166">
            <label>
            <input name="p3166" type="text" id="p3166" onblur="calcula('166')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield5166">
            <label>

            <input name="tp166" type="text" id="tp166" onblur="calcula('166')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield6166">
            <label>
            <input name="tr166" type="text" id="tr166" onblur="calcula('166')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td align="center" valign="middle" class="linhatopo linhaesquerda"><label>

              <input name="mp166" type="text" id="mp166" size="8" readonly="readonly"/>
            </label></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield7166">
            <label>
            <input name="na166" type="text" id="na166" onblur="calcula('166')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield8166">
            <label>

            <input name="rb166" type="text" id="rb166" onblur="calcula('166')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td align="center" valign="middle" class="linhatopo linhaesquerda"><input name="mf166" type="text" id="mf166" size="8" readonly="readonly" /></td>
          </tr>
        </form>
        
        <form id="form167" name="form167" method="post" action="">
          <tr >
            <td colspan="2" class="linhatopo linhaesquerda"><a href="detalhealuno.asp?aid=167&amp;Serie=12">João Antonio Galhardo</a></td>

            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield1167">
            <label>
            <input name="ps167" type="text" id="ps167" onblur="calcula('167')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield2167">
            <label>
            <input name="p1167" type="text" id="p1167" onblur="calcula('167')" value="0,0" size="5" />
            </label>

            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield3167">
            <label>
            <input name="p2167" type="text" id="p2167" onblur="calcula('167')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield4167">
            <label>
            <input name="p3167" type="text" id="p3167" onblur="calcula('167')" value="0,0" size="5" />

            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield5167">
            <label>
            <input name="tp167" type="text" id="tp167" onblur="calcula('167')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield6167">
            <label>

            <input name="tr167" type="text" id="tr167" onblur="calcula('167')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td align="center" valign="middle" class="linhatopo linhaesquerda"><label>
              <input name="mp167" type="text" id="mp167" size="8" readonly="readonly"/>
            </label></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield7167">
            <label>
            <input name="na167" type="text" id="na167" onblur="calcula('167')" value="0,0" size="5" />

            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield8167">
            <label>
            <input name="rb167" type="text" id="rb167" onblur="calcula('167')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td align="center" valign="middle" class="linhatopo linhaesquerda"><input name="mf167" type="text" id="mf167" size="8" readonly="readonly" /></td>
          </tr>

        </form>
        
        <form id="form168" name="form168" method="post" action="">
          <tr  bgcolor="#E6E6E6" >
            <td colspan="2" class="linhatopo linhaesquerda"><a href="detalhealuno.asp?aid=168&amp;Serie=12">Leonardo Lima da Silva</a></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield1168">
            <label>
            <input name="ps168" type="text" id="ps168" onblur="calcula('168')" value="0,0" size="5" />
            </label>

            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield2168">
            <label>
            <input name="p1168" type="text" id="p1168" onblur="calcula('168')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield3168">
            <label>
            <input name="p2168" type="text" id="p2168" onblur="calcula('168')" value="0,0" size="5" />

            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield4168">
            <label>
            <input name="p3168" type="text" id="p3168" onblur="calcula('168')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield5168">
            <label>

            <input name="tp168" type="text" id="tp168" onblur="calcula('168')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield6168">
            <label>
            <input name="tr168" type="text" id="tr168" onblur="calcula('168')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td align="center" valign="middle" class="linhatopo linhaesquerda"><label>

              <input name="mp168" type="text" id="mp168" size="8" readonly="readonly"/>
            </label></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield7168">
            <label>
            <input name="na168" type="text" id="na168" onblur="calcula('168')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield8168">
            <label>

            <input name="rb168" type="text" id="rb168" onblur="calcula('168')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td align="center" valign="middle" class="linhatopo linhaesquerda"><input name="mf168" type="text" id="mf168" size="8" readonly="readonly" /></td>
          </tr>
        </form>
        
        <form id="form169" name="form169" method="post" action="">
          <tr >
            <td colspan="2" class="linhatopo linhaesquerda"><a href="detalhealuno.asp?aid=169&amp;Serie=12">Lucas Arlanch Ferreira</a></td>

            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield1169">
            <label>
            <input name="ps169" type="text" id="ps169" onblur="calcula('169')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield2169">
            <label>
            <input name="p1169" type="text" id="p1169" onblur="calcula('169')" value="0,0" size="5" />
            </label>

            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield3169">
            <label>
            <input name="p2169" type="text" id="p2169" onblur="calcula('169')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield4169">
            <label>
            <input name="p3169" type="text" id="p3169" onblur="calcula('169')" value="0,0" size="5" />

            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield5169">
            <label>
            <input name="tp169" type="text" id="tp169" onblur="calcula('169')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield6169">
            <label>

            <input name="tr169" type="text" id="tr169" onblur="calcula('169')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td align="center" valign="middle" class="linhatopo linhaesquerda"><label>
              <input name="mp169" type="text" id="mp169" size="8" readonly="readonly"/>
            </label></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield7169">
            <label>
            <input name="na169" type="text" id="na169" onblur="calcula('169')" value="0,0" size="5" />

            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield8169">
            <label>
            <input name="rb169" type="text" id="rb169" onblur="calcula('169')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td align="center" valign="middle" class="linhatopo linhaesquerda"><input name="mf169" type="text" id="mf169" size="8" readonly="readonly" /></td>
          </tr>

        </form>
        
        <form id="form170" name="form170" method="post" action="">
          <tr  bgcolor="#E6E6E6" >
            <td colspan="2" class="linhatopo linhaesquerda"><a href="detalhealuno.asp?aid=170&amp;Serie=12">Maria Carolina O. de Melo Reis</a></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield1170">
            <label>
            <input name="ps170" type="text" id="ps170" onblur="calcula('170')" value="0,0" size="5" />
            </label>

            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield2170">
            <label>
            <input name="p1170" type="text" id="p1170" onblur="calcula('170')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield3170">
            <label>
            <input name="p2170" type="text" id="p2170" onblur="calcula('170')" value="0,0" size="5" />

            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield4170">
            <label>
            <input name="p3170" type="text" id="p3170" onblur="calcula('170')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield5170">
            <label>

            <input name="tp170" type="text" id="tp170" onblur="calcula('170')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield6170">
            <label>
            <input name="tr170" type="text" id="tr170" onblur="calcula('170')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td align="center" valign="middle" class="linhatopo linhaesquerda"><label>

              <input name="mp170" type="text" id="mp170" size="8" readonly="readonly"/>
            </label></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield7170">
            <label>
            <input name="na170" type="text" id="na170" onblur="calcula('170')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield8170">
            <label>

            <input name="rb170" type="text" id="rb170" onblur="calcula('170')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td align="center" valign="middle" class="linhatopo linhaesquerda"><input name="mf170" type="text" id="mf170" size="8" readonly="readonly" /></td>
          </tr>
        </form>
        
        <form id="form171" name="form171" method="post" action="">
          <tr >
            <td colspan="2" class="linhatopo linhaesquerda"><a href="detalhealuno.asp?aid=171&amp;Serie=12">Vitor Garcia Guerini</a></td>

            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield1171">
            <label>
            <input name="ps171" type="text" id="ps171" onblur="calcula('171')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield2171">
            <label>
            <input name="p1171" type="text" id="p1171" onblur="calcula('171')" value="0,0" size="5" />
            </label>

            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield3171">
            <label>
            <input name="p2171" type="text" id="p2171" onblur="calcula('171')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield4171">
            <label>
            <input name="p3171" type="text" id="p3171" onblur="calcula('171')" value="0,0" size="5" />

            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield5171">
            <label>
            <input name="tp171" type="text" id="tp171" onblur="calcula('171')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield6171">
            <label>

            <input name="tr171" type="text" id="tr171" onblur="calcula('171')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td align="center" valign="middle" class="linhatopo linhaesquerda"><label>
              <input name="mp171" type="text" id="mp171" size="8" readonly="readonly"/>
            </label></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield7171">
            <label>
            <input name="na171" type="text" id="na171" onblur="calcula('171')" value="0,0" size="5" />

            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td colspan="2" align="center" valign="middle" class="linhatopo linhaesquerda"><span id="sprytextfield8171">
            <label>
            <input name="rb171" type="text" id="rb171" onblur="calcula('171')" value="0,0" size="5" />
            </label>
            <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg"></span></span></td>
            <td align="center" valign="middle" class="linhatopo linhaesquerda"><input name="mf171" type="text" id="mf171" size="8" readonly="readonly" /></td>
          </tr>

        </form>
        
        <tr bgcolor="#E6E6E6">
          <td colspan="20" bgcolor="#FFFFFF" class="linhatopo"> </td>
        </tr>
        
      </table>
    <p> </p></td>
  </tr>
</table>  
<script type="text/javascript">
<!--


var sprytextfield1165 = new Spry.Widget.ValidationTextField("sprytextfield1165", "real", {validateOn:["change"]});
var sprytextfield2165 = new Spry.Widget.ValidationTextField("sprytextfield2165", "real", {validateOn:["change"]});
var sprytextfield3165 = new Spry.Widget.ValidationTextField("sprytextfield3165", "real", {validateOn:["change"]});
var sprytextfield4165 = new Spry.Widget.ValidationTextField("sprytextfield4165", "real", {validateOn:["change"]});
var sprytextfield5165 = new Spry.Widget.ValidationTextField("sprytextfield5165", "real");
var sprytextfield6165 = new Spry.Widget.ValidationTextField("sprytextfield6165", "real", {validateOn:["change"]});
var sprytextfield7165 = new Spry.Widget.ValidationTextField("sprytextfield7165", "real");
var sprytextfield8165 = new Spry.Widget.ValidationTextField("sprytextfield8165", "real", {validateOn:["change"]});


var sprytextfield1166 = new Spry.Widget.ValidationTextField("sprytextfield1166", "real", {validateOn:["change"]});
var sprytextfield2166 = new Spry.Widget.ValidationTextField("sprytextfield2166", "real", {validateOn:["change"]});
var sprytextfield3166 = new Spry.Widget.ValidationTextField("sprytextfield3166", "real", {validateOn:["change"]});
var sprytextfield4166 = new Spry.Widget.ValidationTextField("sprytextfield4166", "real", {validateOn:["change"]});
var sprytextfield5166 = new Spry.Widget.ValidationTextField("sprytextfield5166", "real");
var sprytextfield6166 = new Spry.Widget.ValidationTextField("sprytextfield6166", "real", {validateOn:["change"]});
var sprytextfield7166 = new Spry.Widget.ValidationTextField("sprytextfield7166", "real");
var sprytextfield8166 = new Spry.Widget.ValidationTextField("sprytextfield8166", "real", {validateOn:["change"]});


var sprytextfield1167 = new Spry.Widget.ValidationTextField("sprytextfield1167", "real", {validateOn:["change"]});
var sprytextfield2167 = new Spry.Widget.ValidationTextField("sprytextfield2167", "real", {validateOn:["change"]});
var sprytextfield3167 = new Spry.Widget.ValidationTextField("sprytextfield3167", "real", {validateOn:["change"]});
var sprytextfield4167 = new Spry.Widget.ValidationTextField("sprytextfield4167", "real", {validateOn:["change"]});
var sprytextfield5167 = new Spry.Widget.ValidationTextField("sprytextfield5167", "real");
var sprytextfield6167 = new Spry.Widget.ValidationTextField("sprytextfield6167", "real", {validateOn:["change"]});
var sprytextfield7167 = new Spry.Widget.ValidationTextField("sprytextfield7167", "real");
var sprytextfield8167 = new Spry.Widget.ValidationTextField("sprytextfield8167", "real", {validateOn:["change"]});


var sprytextfield1168 = new Spry.Widget.ValidationTextField("sprytextfield1168", "real", {validateOn:["change"]});
var sprytextfield2168 = new Spry.Widget.ValidationTextField("sprytextfield2168", "real", {validateOn:["change"]});
var sprytextfield3168 = new Spry.Widget.ValidationTextField("sprytextfield3168", "real", {validateOn:["change"]});
var sprytextfield4168 = new Spry.Widget.ValidationTextField("sprytextfield4168", "real", {validateOn:["change"]});
var sprytextfield5168 = new Spry.Widget.ValidationTextField("sprytextfield5168", "real");
var sprytextfield6168 = new Spry.Widget.ValidationTextField("sprytextfield6168", "real", {validateOn:["change"]});
var sprytextfield7168 = new Spry.Widget.ValidationTextField("sprytextfield7168", "real");
var sprytextfield8168 = new Spry.Widget.ValidationTextField("sprytextfield8168", "real", {validateOn:["change"]});


var sprytextfield1169 = new Spry.Widget.ValidationTextField("sprytextfield1169", "real", {validateOn:["change"]});
var sprytextfield2169 = new Spry.Widget.ValidationTextField("sprytextfield2169", "real", {validateOn:["change"]});
var sprytextfield3169 = new Spry.Widget.ValidationTextField("sprytextfield3169", "real", {validateOn:["change"]});
var sprytextfield4169 = new Spry.Widget.ValidationTextField("sprytextfield4169", "real", {validateOn:["change"]});
var sprytextfield5169 = new Spry.Widget.ValidationTextField("sprytextfield5169", "real");
var sprytextfield6169 = new Spry.Widget.ValidationTextField("sprytextfield6169", "real", {validateOn:["change"]});
var sprytextfield7169 = new Spry.Widget.ValidationTextField("sprytextfield7169", "real");
var sprytextfield8169 = new Spry.Widget.ValidationTextField("sprytextfield8169", "real", {validateOn:["change"]});


var sprytextfield1170 = new Spry.Widget.ValidationTextField("sprytextfield1170", "real", {validateOn:["change"]});
var sprytextfield2170 = new Spry.Widget.ValidationTextField("sprytextfield2170", "real", {validateOn:["change"]});
var sprytextfield3170 = new Spry.Widget.ValidationTextField("sprytextfield3170", "real", {validateOn:["change"]});
var sprytextfield4170 = new Spry.Widget.ValidationTextField("sprytextfield4170", "real", {validateOn:["change"]});
var sprytextfield5170 = new Spry.Widget.ValidationTextField("sprytextfield5170", "real");
var sprytextfield6170 = new Spry.Widget.ValidationTextField("sprytextfield6170", "real", {validateOn:["change"]});
var sprytextfield7170 = new Spry.Widget.ValidationTextField("sprytextfield7170", "real");
var sprytextfield8170 = new Spry.Widget.ValidationTextField("sprytextfield8170", "real", {validateOn:["change"]});


var sprytextfield1171 = new Spry.Widget.ValidationTextField("sprytextfield1171", "real", {validateOn:["change"]});
var sprytextfield2171 = new Spry.Widget.ValidationTextField("sprytextfield2171", "real", {validateOn:["change"]});
var sprytextfield3171 = new Spry.Widget.ValidationTextField("sprytextfield3171", "real", {validateOn:["change"]});
var sprytextfield4171 = new Spry.Widget.ValidationTextField("sprytextfield4171", "real", {validateOn:["change"]});
var sprytextfield5171 = new Spry.Widget.ValidationTextField("sprytextfield5171", "real");
var sprytextfield6171 = new Spry.Widget.ValidationTextField("sprytextfield6171", "real", {validateOn:["change"]});
var sprytextfield7171 = new Spry.Widget.ValidationTextField("sprytextfield7171", "real");
var sprytextfield8171 = new Spry.Widget.ValidationTextField("sprytextfield8171", "real", {validateOn:["change"]});


//-->
</script>

</body>
</html>

Veja q para cada aluno eu tenho um codigo q liguei a identificação dos text fields. Queria fazer o calculo para cada aluno.

Se for possivel, poderia ao invés também de usar varios forms, usar somente um. Será que tem como?

Obrigado

Link para o comentário
Compartilhar em outros sites

0 respostass a esta questão

Posts Recomendados

Até agora não há respostas para essa pergunta

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,3k
    • Posts
      652,3k
×
×
  • Criar Novo...