Estou com um probleminha aqui. coloquei a imagem aqui pra ficar melhor http://desmond.imageshack.us/Himg594/scale...&res=medium Como pode ver, estou recebendo o nome do produto e o valor dele. quando preencho a quantidade e no subtotal obviamente vai a soma. O problema é que o subtotal e o total os valores estão recebendo Inteiros...Se alguém pudesse me ajudar a mudar para float, eu ficaria grato. Esse vai no arquivo php acredito que o problema esteja nessa parte do código. como colocar pro subtotal aparecer como no preço? function conta()
{
document.getElementById("subtotal1").value=(document.getElementById("preco1").value*document.getElementById("quantidade1").value);
if(document.getElementById("subtotal1").value=="NaN")document.getElementById("subtotal1").value=0;
document.getElementById("total").value=(parseInt(document.getElementById("subtotal1").value)+parseInt(document.getElementById("subtotal2").value)+parseInt(document.getElementById("subtotal3").value)+parseInt(document.getElementById("subtotal4").value)+parseInt(document.getElementById("subtotal5").value));
}
var win = null;
function NovaJanela(pagina,nome,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(pagina,nome,settings);
} Valeu!