• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Changing <div> content in firefox

Lich

Limp Gawd
Joined
Dec 23, 2005
Messages
487
I have a script that changes the html in a div, the problem is that in firefox it doesn't change delete the old div content, it just amends it. So it looks pretty weird.

The page is at http://signs365.com/newsite/development/vehiclemagnets.php it works great in IE and Opera, but firefox has issues with it. Here's the javascript function that gives the issue

Code:
function minQuantity()
 {
		   var size = eval(document.magnetForm.size.value);
		   var quantityHTML = document.getElementById("quantity");
		   
		   quantityHTML.innerHTML = "";
		   
			 if(size == 2) {
				 
				quantityHTML.innerHTML = "<select name=\"quantity\" id=\"quantity\" onchange=\"calcMagnets();\"><option value=\"1\" selected>1</option><option value=\"2\">2</option><option value=\"3\">3</option><option value=\"4\">4</option><option value=\"5\">5</option><option value=\"6\">6</option><option value=\"7\">7</option><option value=\"8\">8</option><option value=\"9\">9</option><option value=\"10\">10</option></select>";
  			
			} else if(size == 1){

				var quantityHTML = document.getElementById("quantity"); 
				quantityHTML.innerHTML = "<select name=\"quantity\" id=\"quantity\" onchange=\"calcMagnets();\"><option value=\"2\">2</option><option value=\"3\">3</option><option value=\"4\">4</option><option value=\"5\">5</option><option value=\"6\">6</option><option value=\"7\">7</option><option value=\"8\">8</option><option value=\"9\">9</option><option value=\"10\">10</option></select>";
  			}

 }
 
Part of the problem may be the fact that you're adding a select element named "quantity" inside a div element named "quantity". Name the div something different than the select, see if that helps. ;]
 
ha, that worked. thanks bro. Not I just gotta figure out why it doesn't want to calc when I change the price, but it's a lot better than I got before. :D
 
Back
Top