This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

ابحث في الدعم

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

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

  • 1 (رد واحد)
  • 0 have this problem
  • 9 views
  • آخر ردّ كتبه 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

All Replies (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)