Pesquisar no site de suporte

Evite golpes de suporte. Nunca pedimos que você ligue ou envie uma mensagem de texto para um número de telefone, ou compartilhe informações pessoais. Denuncie atividades suspeitas usando a opção “Denunciar abuso”.

Learn More

Esta discussão foi arquivada. Faça uma nova pergunta se precisa de ajuda.

javascript function fails in version 3.6.3, but worked in all previous versions

  • 1 resposta
  • 0 tem este problema
  • 9 visualizações
  • Última resposta de zzxc

more options

function show_prompt(){

var cost = prompt("Please enter cost amount","");

if (cost!=null && cost!="") { document.getElementById("ncost").value = cost; document.getElementById("nno").value=1; } else { show_prompt(); } }


This function has caused no problems until i upgraded to firefox 3.6.3. The function fails to set the value of the html element until the function is called again, at which point the value from the first function call is successfully inserted.

This is obviously not workable, so i have had to backgrade to 3.5.9 so that the problem doesnt happen, but this is obviously not a long term solution.

This happened

Every time Firefox opened

== I upgraded to version 3.6.3

function show_prompt(){ var cost = prompt("Please enter cost amount",""); if (cost!=null && cost!="") { document.getElementById("ncost").value = cost; document.getElementById("nno").value=1; } else { show_prompt(); } } This function has caused no problems until i upgraded to firefox 3.6.3. The function fails to set the value of the html element until the function is called again, at which point the value from the first function call is successfully inserted. This is obviously not workable, so i have had to backgrade to 3.5.9 so that the problem doesnt happen, but this is obviously not a long term solution. == This happened == Every time Firefox opened == I upgraded to version 3.6.3

Todas as respostas (1)

more options

Could you link to an example that shows this code in use? From your description, I can't be sure what's happening. (My best guess is that it's prompting you twice for the cost instead of just once)