Rechercher dans l’assistance

Évitez les escroqueries à l’assistance. Nous ne vous demanderons jamais d’appeler ou d’envoyer un SMS à un numéro de téléphone ou de partager des informations personnelles. Veuillez signaler toute activité suspecte en utilisant l’option « Signaler un abus ».

Learn More

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

  • 1 réponse
  • 0 a ce problème
  • 9 vues
  • Dernière réponse par 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

Toutes les réponses (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)