Ir para conteúdo
Fórum Script Brasil

PauloLL

Membros
  • Total de itens

    2
  • Registro em

  • Última visita

Sobre PauloLL

PauloLL's Achievements

0

Reputação

  1. Código fonte na íntegra: <html> <head><title>Curso prático Online</title> <link type="text/css" rel="stylesheet" href="/kintool/css/tool.css"></link> <link type="text/css" rel="stylesheet" href="/kintool/css/components.css"></link> <script type="text/javascript" src="/kintool/global.js"></script> <script type="text/javascript" src="/kintool/ajax.js"></script> <script type="text/javascript" src="/kintool/tool.js"></script> <script type="text/javascript" src="/kintool/form.js"></script> <script type="text/javascript" src="/kintool/components.js"></script> <script language="JavaScript" src="/tópico/is.js?3"></script> <link href="/classes.css" rel="stylesheet" type="text/css"> <link href="/tópico/classes_cgi.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#163D5C" bbgcolor="Black" text="White" link="White" vlink="White" alink="White" leftmargin=0 topmargin=0 class=base> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="50"><tr><td background="/tópico/base_janelas.jpg"><font color="#FF9900" style="font-size:18px">&nbsp;&nbsp;Aulas - Horários</font></td></tr></table> <script> function selec(sel, id) { sel.val = sel.options[sel.selectedIndex].value; if( sel.val != '' ) show(id+1); else show(id); } function show(id) { var i, j, k, ok, opt; if( id >= sels.length ) return; for( i = id ; i < sels.length ; i++ ) { limpa( sels ); } i = id; opt = document.createElement("OPTION"); sels.options.add(opt); for( j = 0 ; j < horarios.length ; j++ ) { ok = true; for( k = 0 ; k < id ; k++ ) if( sels[k].val == hval[j] ) ok = false; if( ok ) { opt = document.createElement("OPTION"); opt.text = horarios[j]; opt.value = hval[j]; sels.options.add(opt); } } // sels[id].disabled = false; sels[id].style.display = 'block'; } function limpa(sel) { var i; sel.val = ''; // sel.disabled = true; sel.style.display = 'none'; for( i = 0 ; i < sel.options.length ; i ) sel.options.remove(i); } function init() { sels = [ document.frm.h1, document.frm.h2, document.frm.h3, document.frm.h4, document.frm.h5, document.frm.h6, document.frm.h7, document.frm.h8, document.frm.h9, document.frm.h10 ]; show( 0 ); } function continua() { var ok = true; var i; for( i = 0 ; i < sels.length ; i++ ) if( sels.val == '' ) ok = false; if( !ok ) { alert( 'Selecione suas 10 opções de horário na ordem de preferência' ); event.returnValue = false; return; } } var horarios = [ '11h-12h', '12h-13h', '13h-14h', '14h-15h', '17h-18h', '18h-19h', '20h-21h', '21h-22h', '22h-23h', '23h-0h']; var hval = [11, 12, 13, 14, 17, 18, 20, 21, 22, 23]; var sels = new Array; </script> <form action="/cgi-bin/tópico/inscricaohorario.cgi" method="POST" name="frm" id="frm" onsubmit="continua()"> <input type="Hidden" name="i" value="130160001512878905589790"> <input type="Hidden" name="cid" value="4214"> <input type="Hidden" name="nomecamp" value="Curso 2011 - Classe C"> <input type="Hidden" name="nhorarios" value="10"> <table border=0><tr><td width=20></td><td> <b>Curso Online - Classe C</b><br> <br> <font color=#FF9900 class=base><b>Escolha em ordem de preferência, o horário em que deseja participar.</b></font><br> <br> <table class=base> <tr height=22><td><b>1º opção<td><select name=h1 onchange="selec(this,0)" class=formtxt></select> <tr height=22><td><b>2º opção<td><select name=h2 onchange="selec(this,1)" class=formtxt></select> <tr height=22><td><b>3º opção<td><select name=h3 onchange="selec(this,2)" class=formtxt></select> <tr height=22><td><b>4º opção<td><select name=h4 onchange="selec(this,3)" class=formtxt></select> <tr height=22><td><b>5º opção<td><select name=h5 onchange="selec(this,4)" class=formtxt></select> <tr height=22><td><b>6º opção<td><select name=h6 onchange="selec(this,5)" class=formtxt></select> <tr height=22><td><b>7º opção<td><select name=h7 onchange="selec(this,6)" class=formtxt></select> <tr height=22><td><b>8º opção<td><select name=h8 onchange="selec(this,7)" class=formtxt></select> <tr height=22><td><b>9º opção<td><select name=h9 onchange="selec(this,8)" class=formtxt></select> <tr height=22><td><b>10º opção<td><select name=h10 onchange="selec(this,9)" class=formtxt></select> </table> <br><font class=base><font color=#FF9900><b>Atenção!</b></font> Sua nova opção de horários só será válida para a <font color=#FF9900><b>próxima programação de aulas</b></font>. Na medida do possível as aulas atenderão sua prioridade de horários mas <font color=#FF9900><b>poderão ocorrer casos em que será utilizada até mesmo sua última opção</b></font>. <br><br>O <font color=#FF9900><b>não comparecimento</b></font> no horário definido da sua participação implicará em <font color=#FF9900><b>falta e perda de pontos</b></font>. </font><br><br> <input type="Submit" name="" value=" Alterar preferências de horário " class=botao> <script> init(); </script><br><br><br><br> </td></tr></table></form>
  2. Acho que estou precisando de algo muito parecido com o que foi colocado aqui. Usando VBA (Excel), acesso um site via IE, executo meu login, faço confirmações nas duas páginas seguintes e chego a última página onde tenho que preeencher 10 campos, sendo que no primeiro tenho 10 opções, e nas seguinte não aparecem mais as opções que selecionei anteriormente. Meu problema que esses campos não aceitam digitação, obrigatoriamente eu tenho que selecionar na lista de opções disponíveis. A cada campo eu clico para abrir as opçoes, seleciono uma, e vou para o campo seguinte, até preencher as 10. IMPORTANTE: Para mim bastaria algo que simulasse a sequencia que executo no teclado, quando preencho manualmente: clico sobre a primeira caixa, seta pra baixo para selecionar a primeira opcao disponível, em seguida <TAB> para passar a segunda caixa, e repito isso ate preencher todas. Tenho o código fonte da página se necessário. alguém poderia me ajudar? Antecipadamente grato Paulo. Código fonte da página: &lt;script> function selec(sel, id) { sel.val = sel.options[sel.selectedIndex].value; if( sel.val != '' ) show(id+1); else show(id); } function show(id) { var i, j, k, ok, opt; if( id >= sels.length ) return; for( i = id; i < sels.length; i++ ) { limpa( sels[i] ); } i = id; opt = document.createElement("OPTION"); sels[i].options.add(opt); for( j = 0; j < horarios.length; j++ ) { ok = true; for( k = 0; k < id; k++ ) if( sels[k].val == hval[j] ) ok = false; if( ok ) { opt = document.createElement("OPTION"); opt.text = horarios[j]; opt.value = hval[j]; sels[i].options.add(opt); } } // sels[id].disabled = false; sels[id].style.display = 'block'; } function limpa(sel) { var i; sel.val = ''; // sel.disabled = true; sel.style.display = 'none'; for( i = 0; i < sel.options.length; i ) sel.options.remove(i); } function init() { sels = [ document.frm.h1, document.frm.h2, document.frm.h3, document.frm.h4, document.frm.h5, document.frm.h6, document.frm.h7, document.frm.h8, document.frm.h9, document.frm.h10 ]; show( 0 ); } function continua() { var ok = true; var i; for( i = 0; i < sels.length; i++ ) if( sels[i].val == '' ) ok = false; if( !ok ) { alert( 'Selecione suas 10 opções de horário na ordem de preferência' ); event.returnValue = false; return; } } var horarios = [ '11h-12h', '12h-13h', '13h-14h', '14h-15h', '17h-18h', '18h-19h', '20h-21h', '21h-22h', '22h-23h', '23h-0h']; var hval = [11, 12, 13, 14, 17, 18, 20, 21, 22, 23]; var sels = new Array; </script> <form action="/cgi-bin/tópico/inscricaohorario.cgi" method="POST" name="frm" id="frm" onsubmit="continua()"> <input type="Hidden" name="i" value="130160001512878905589790"> <input type="Hidden" name="cid" value="4214"> <input type="Hidden" name="nomecamp" value="Curso 2011 - Classe C"> <input type="Hidden" name="nhorarios" value="10"> <table border=0><tr><td width=20></td><td> <b>Curso Online - Classe C</b><br> <br> <font color=#FF9900 class=base><b>Escolha em ordem de preferência, o horário em que deseja participar.</b></font><br> <br> <table class=base> <tr height=22><td><b>1º opção<td><select name=h1 onchange="selec(this,0)" class=formtxt></select> <tr height=22><td><b>2º opção<td><select name=h2 onchange="selec(this,1)" class=formtxt></select> <tr height=22><td><b>3º opção<td><select name=h3 onchange="selec(this,2)" class=formtxt></select> <tr height=22><td><b>4º opção<td><select name=h4 onchange="selec(this,3)" class=formtxt></select> <tr height=22><td><b>5º opção<td><select name=h5 onchange="selec(this,4)" class=formtxt></select> <tr height=22><td><b>6º opção<td><select name=h6 onchange="selec(this,5)" class=formtxt></select> <tr height=22><td><b>7º opção<td><select name=h7 onchange="selec(this,6)" class=formtxt></select> <tr height=22><td><b>8º opção<td><select name=h8 onchange="selec(this,7)" class=formtxt></select> <tr height=22><td><b>9º opção<td><select name=h9 onchange="selec(this,8)" class=formtxt></select> <tr height=22><td><b>10º opção<td><select name=h10 onchange="selec(this,9)" class=formtxt></select>
×
×
  • Criar Novo...