Closed
Bug 301953
Opened 19 years ago
Closed 19 years ago
a onclick not working
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 102695
People
(Reporter: ramonck, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.9) Gecko/20050711 Firefox/1.0.5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.9) Gecko/20050711 Firefox/1.0.5 html file: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN" "http://www.w3.org/TR/REC-html40/frameset.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <script language="javascript"> function areFieldsEmpty(f){ f= document.forms[f]; for (var i=0; i < f.elements.length; i++){ if (f.elements[i].value!==f.elements[i].defaultValue){ f.elements[f.elements.length-2].disabled=false; f.elements[f.elements.length-3].disabled=false; return false; } else { f.elements[f.elements.length-2].disabled=true; f.elements[f.elements.length-3].disabled=true; } } return true; } function mascara_check() { if(document.forms[0].tipo.value==10) { document.getElementById('mascara').style.visibility='visible'; } else { document.getElementById('mascara').style.visibility='hidden'; document.forms[0].mascara_texto.value=''; } } </script> </head> <body style="background-color:#F4F4F4;" onload="mascara_check();this.focus();"> <form method="post" action="" OnKeyUp="areFieldsEmpty('0');"> <div id="editar"> <span> <ul> <li>Texto</li> <li><input class="inputext" type="text" value="Sexo:"></li> </ul> <br> <ul> <li>Posição do Texto</li> <li><select size="1" name="pos_texto" OnChange="mascara_check();"><option value="">SELECIONE A POSIÇÃO</option><option value="1">esquerda ao topo</option><option value="2" selected="selected">esquerda ao meio</option><option value="3">esquerda à base</option><option value="4">esquerda ao topo</option><option value="5">meio à base</option><option value="6">direita ao topo</option><option value="7">direita ao meio</option><option value="8">direita à base</option></select></li> </ul> </span> <span> <ul> <li><a OnClick="alert(1);">Alterar valor padrão</a></li> </ul> <br> <ul> <li>Tamanho Máximo do Campo</li> <li><input class="inputext" type="text" name="tam_maximo" value="100"></li> </ul> </span> <span> <ul> <li>Descrição do Campo</li> <li><input class="inputext" type="text" name="descricao" value="Escolha do sexo"></li> </ul> <br> <ul> <li>Tipo do Campo</li> <li><select size="1" name="tipo" OnChange="mascara_check();"><option value="">SELECIONE O TIPO</option><option value="1">botão</option><option value="2">caixa de confirmação</option><option value="3">arquivo</option><option value="4">não visível</option><option value="5">imagem</option><option value="6">senha</option><option value="7">seleção única</option><option value="8">apagar</option><option value="9">enviar</option><option value="10">texto</option><option value="11" selected="selected">caixa de seleção</option><option value="12">link</option></select></li> </ul> </span> <span id="mascara"> <ul> <li>Máscara do Campo</li> <li><input class="inputext" type="text" name="mascara_texto" value="" style="width:140px; " maxlength="255"></li> </ul> </span> </div> <div id="menu_2" style="float:left;text-align:right;position:absolute;width:100%;"> <input type="submit" name="submeter" onClick="this.blur();if(confirm('Você deseja salvar as alterações efetuadas?')){return true;}else{return false;}" style="background:#c0c0c0 url('path.php?id=1&img=salvar.gif') no-repeat;height:25px;width:25px;cursor: pointer;" value="" title="Salvar" disabled> <input type="reset" name="resetar" onClick="this.blur();reset();resetar.disabled=true;submeter.disabled=true;" style="background:#c0c0c0 url('path.php?id=1&img=resetar.gif') no-repeat bottom left;height:25px;width:25px;cursor: pointer;" value="" title="Resetar" disabled> <input type="button" onClick="this.blur();if(submeter.disabled==false){if(confirm('Você deseja fechar as propriedades sem salvar as alterações?')){document.location.href='?pagina=ed_3';}else{return false;}}else{document.location.href='?pagina=ed_3';}" style="background:#c0c0c0 url('path.php?id=1&img=sair.gif') no-repeat center center;height:25px;width:22px;cursor: pointer;" title="Sair"> </div> </form> </body> </html> css file: /* CSS Document */ .left_top{text-align:left; vertical-align:text-top; float:left;} .left_middle{text-align:left; vertical-align:middle; float:left;} .left_bottom{text-align:left; vertical-align:text-bottom; float:left;} .top_left{text-align:left; vertical-align:text-top; float:left;} #1 {float:left; padding:0px;vertical-align:top;} #2 {float:left; padding:0px;vertical-align:top;} .ed_1 {color:#FFFFFF;font-size: 12px; line-height: 11px; font-family: Arial; font-weight: bold; margin: 1px 1px 1px 4px;} .erro{color:#FF0000;font-weight:bold;} .menu_1 {color:#FFFFFF;background:#4D7AFA;font-family:'Georgia', serif, Times New Roman, Times;font-weight:bold;font-size:12px;border:1px solid #000000;padding: 3px 3px 3px 3px;} .menu_1:hover {color:#375DC9;background:#FFFFFF;font-family:'Georgia', serif, Times New Roman, Times;font-weight:bold;font-size:12px;border:1px solid #000000;padding: 3px 3px 3px 3px;} .menu_2 {color:#FFFFFF;background:#18368B;font-size: 12px; line-height: 12px; font-family: Arial; font-weight: bold; margin: 1px 1px 1px 4px;border:1px solid #000000;padding: 3px 3px 3px 3px;} .menu_2:hover {color:#18368B;background:#FFFFFF;font-size: 12px; line-height: 12px; font-family: Arial; font-weight: bold; margin: 1px 1px 1px 4px;border:1px solid #000000;padding: 3px 3px 3px 3px;} /** Zerando todos os margins naturais para não atrapalhar **/ body, h1, h2, h3, h4, h5, h6, form, dl, ul, ol, dt, dd, p, address { margin:0px; padding:0px; } img {border:0px;} dl {font:70% verdana, arial, tahoma;} dl dd {margin-bottom:5px;} dl dt {font-weight:bold;} div.botao { text-align:right; margin-top:15px; } fieldset { border:0px; padding:0px; } blockquote { font:90% Verdana; _font:70% Verdana; padding:10px; margin:15px; width:420px; font-style:italic; font-weight:bold; text-align:center; } /** Formulários **/ .forms { font:80% Verdana, Arial, Tahoma, 'Sans-Serif'; width:350px; } select {vertical-align:middle;} input {vertical-align:middle;} .inputext { width:200px; border:1px solid #C0C0C0; margin-bottom:2px; font-family:'arial'; font-size:9pt; } textarea.textaream { width:350px; height:150px; border:1px solid #C0C0C0; } /* Edição */ #editar { font-family:georgia, 'arial', sans-serif; font-size:12px; } #editar span{ float:left; } #editar ul { list-style:none; margin: 0 0 0 40px; } Reproducible: Always Steps to Reproduce: 1.save the html and css file in the same folder 2.click on the "Alterar valor padrão" Actual Results: should call an alert due to <a onclick="alert(1);"> and nothing happens Expected Results: Expect an alert 1, just like on internet explorer.
Comment 1•19 years ago
|
||
The second div appears over the top of the first and events go to the highest element. Please in the future do not use bugzilla as a support forum and if you do come across a bug, try to post a simplified testcase as an attachment to the bug to make others lives easier. *** This bug has been marked as a duplicate of 102695 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•