List Info

Thread: Dúvida cruel com arrays...




Dúvida cruel com arrays...
country flaguser name
United States
2008-03-02 00:33:28

Bom é o seguinte...

Eu tenho uma listagem de alunos para cadastro de chamadas do mês:

aluno[1]
Presente[1]
MeioPeriodo[1]
Sabado[1]

aluno[2]
Presente[2]
MeioPeriodo[2]
Sabado[2]

aluno[3]
Presente[3]
MeioPeriodo[3]
Sabado[3]
...

Eu precisaria de uma função que acionando o botao selecionasse por
exemplo todos os Presente ou MeioPeriodo ou Sabado de todos os alunos,
conforme escolha de acordo com a lista de chamadas em mãos.

No submit dessa página, feita em php vou pegar aluno por aluno e ver
qual dos 3 foi selecionado, e isso já tenho pronto.

Só preciso mesmo dessa função em javascript.

Alguém pode me ajudar ?

*
Luciano Marinho*

nickmarinho%40gmail.com">nickmarinhogmail.com <mailto: nickmarinho%40gmail.com">nickmarinhogmail.com>
www.lucianomarinho.com.br <http://www.lucianomarinho.com.br/>

*Analista Desenvolvedor Programador PHP/C++*

__._,_.___
.

__,_._,___
Re: Dúvida cruel com arrays...
country flaguser name
United States
2008-03-03 15:12:18

I have run your message through several Portuguese to English translators on
the Internet, and have a bit of an idea of what you are asking for.
However, you do not appear to be supplying nearly enough information. If
you already have JavaScript code that you want to change, please show it.
Please also show the HTML that has the selections for the students, plus any
transformation from your array to those items on the screen that the user
will select.

You also haven't said what you want the JavaScript to do once the selection
is made. Your PHP is already acting on the selection, so it's not clear
what you would need to do with JavaScript.

You will need to describe accurately what you want to do - and this
explanation will need to be in English for this group, unfortunately.

Regards, Dave S

----- Original Message -----
From: < nickmarinho%40yahoo.com.br">nickmarinhoyahoo.com.br>
To: "Javascript"; < javascript_official%40yahoogroups.com">javascript_officialyahoogroups.com>
Sent: Sunday, March 02, 2008 5:33 PM
Subject: [JavaScript] Dúvida cruel com arrays...

Bom é o seguinte...

Eu tenho uma listagem de alunos para cadastro de chamadas do mês:

aluno[1]
Presente[1]
MeioPeriodo[1]
Sabado[1]

aluno[2]
Presente[2]
MeioPeriodo[2]
Sabado[2]

aluno[3]
Presente[3]
MeioPeriodo[3]
Sabado[3]
...

Eu precisaria de uma função que acionando o botao selecionasse por
exemplo todos os Presente ou MeioPeriodo ou Sabado de todos os alunos,
conforme escolha de acordo com a lista de chamadas em mãos.

No submit dessa página, feita em php vou pegar aluno por aluno e ver
qual dos 3 foi selecionado, e isso já tenho pronto.

Só preciso mesmo dessa função em javascript.

Alguém pode me ajudar ?

*
Luciano Marinho*

nickmarinho%40gmail.com">nickmarinhogmail.com <mailto: nickmarinho%40gmail.com">nickmarinhogmail.com>
www.lucianomarinho.com.br <http://www.lucianomarinho.com.br/>

*Analista Desenvolvedor Programador PHP/C++*

Visit http://aiaiai.com for more groups to join
Yahoo! Groups Links

__._,_.___
.

__,_._,___
Re: Dúvida cruel com arrays...
country flaguser name
United States
2008-03-03 20:09:17

Sorry for incovenience, i'd posted the same in portuguese list of
javascript, but none of these members help me.

Ok, i will describe my question now

I have some grups of radio buttons:

<script type=";text/javascript";>
function check_all(chks){
for(var t = chks.value.length, i=0; i < t; i++) chks[i].checked = true;
}
</script>

<form name=";dados"; action=&quot;" method=&quot;"&gt;

<;input type=";radio"; name=";presence[1]" value=&quot;Present&quot; />
<input type=";radio"; name=";presence[1]" value=&quot;HalfTime&quot; />
<input type=";radio"; name=";presence[1]" value=&quot;Saturday&quot; />
<input type=";radio"; name=";presence[1]" value=&quot;Absent&quot; />

<input type=";radio"; name=";presence[2]" value=&quot;Present&quot; />
<input type=";radio"; name=";presence[2]" value=&quot;HalfTime&quot; />
<input type=";radio"; name=";presence[2]" value=&quot;Saturday&quot; />
<input type=";radio"; name=";presence[2]" value=&quot;Absent&quot; />

<input type=";radio"; name=";presence[3]" value=&quot;Present&quot; />
<input type=";radio"; name=";presence[3]" value=&quot;HalfTime&quot; />
<input type=";radio"; name=";presence[3]" value=&quot;Saturday&quot; />
<input type=";radio"; name=";presence[3]" value=&quot;Absent&quot; />

//I want here one button to select all "Present"
//Another to all "HalfTime"
//One another to all "Saturday"
//And finally another to "Absent"
//The function on top don't work, how can I do this ?

// Best Regards For All Friends !!! =D

&lt;input type=";button&quot; value=&quot;Mark all"
onclick="javascript:check_all(document.dados.elements['Present']);" />
<input type=";button&quot; value=&quot;Mark all ½"
onclick="javascript:check_all(document.dados.elements['HalfTime']);" />
<input type=";button&quot; value=&quot;Mark All Saturday&quot;
onclick="javascript:check_all(document.dados.elements['Saturday']);" />
<input type=";button&quot; value=&quot;Mark All Absent&quot;
onclick="javascript:check_all(document.dados.elements['Absent']);" />

<input type=";submit&quot; value=&quot;Submit&quot; />

</form&gt;

__._,_.___
.

__,_._,___
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )