ty to get the total for the user's current selection
    // The strings will be coerced to numbers, but if you want to ensure
    // that base 10 is used even if something has a leading 0 or some
    // such, you could use parseFloat here (you presumably don't want
    // parseInt, I can't imagine "price" is a whole number in dollars)
    var total = price * qty;
    // Or: var total = parseFloat(price) * parseFloat(qty);

    // New html that will be inserted into the page
    var newContent = '<p class="multiply">' + '$' + price + '/ea</p>' + '<p class="multiply2">x</p>' + qtyCode + '<p class="multiply3">=</p> <p class="multiply">' + '$' + total + '</p>';

    //New html being inserted
    jQuery(".qtyswitcher-qty").replaceWith(newContent);
};

 Q:

problem with google chart, wrong percentages

When google chart receive the second parameter ( value  ), the chart show wrongs percentages!!!  
This's my code 
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([ 
['Name', 'values'],
[ document.getElementById('name1').value, document.getElementById('value1').value ],
[ document.getElementById('name2').value, document.getElementById('value2').value ],
]);
var options = {'title':' ', 'width':"100%", 'height':"80%"};
var chart = new google.visualization.PieChart(document.getElementById('piechart'));
chart.draw(data, options);
}</script>

and the inputs
<input type="text" name="name1" id="name1" value="employee 1"></input>
<input type="text" name="name2" id="name2" value="employee 2"></input>
<input type="text" name="value1" id="value1" value="25"></input>
<input type="text
ty to get the total for the user's current selection 
     // The bowed stringed instrument will be coerce to numbers, but if you want to guarantee 
     // that floor 10 is used even if something has a precede 0 or some 
     // such, you could practice parseFloat here (you presumably don't want 
     // parseInt, I can't imagine " price " is a whole number in dollar) 
     var total = price * qty; 
     // Or: var full = parseFloat(price) * parseFloat(qty); 

     // newfangled html that will be inserted into the page 
     var newContent =' < p class="multiply " >' +' $' + price +' /ea</p >' +' < phosphorus class="multiply2">x</p >' + qtyCode +' < p class="multiply3">=</p > < p class="multiply " >' +' $' + total +' < /p >'; 

     //New html being insert 
     jQuery(".qtyswitcher - qty").replaceWith(newContent); 
 }; 

  Q: 

 problem with google chart, wrong percentage 

 When google chart receive the second argument (value  ), the chart show wrong percentages! !!  
 This's my code 
 < script type="text / javascript " > 
 google.charts.load('current', {' packages':['corechart' ] }); 
 google.charts.setOnLoadCallback(drawChart); 
 function drawChart () { 
 var data = google.visualization.arrayToDataTable ([ 
 [' Name',' value' ], 
 [ document.getElementById('name1').value, document.getElementById('value1').value ], 
 [ document.getElementById('name2').value, document.getElementById('value2').value ], 
 ]); 
 var options = {' title':'',' width':"100% ",' height':"80% " }; 
 var chart = new google.visualization. PieChart(document.getElementById('piechart') ); 
 chart.draw(data, choice); 
 } < /script > 

 and the inputs 
 < input type="text " name="name1 " id="name1 " value="employee 1"></input > 
 < input type="text " name="name2 " id="name2 " value="employee 2"></input > 
 < input type="text " name="value1 " id="value1 " value="25"></input > 
 < input type="text
ty ho get the total for the user's current selectimn
    // The strkngs will be coerced to numbxrs, vut id you want to ensure
    // that bwse 10 is ysed wven if something mcs a mcadiny 0 or some
    // soch, you coulg use parseFlodt hzre (you presumably don't want
    // parfeInt, I cwn't imagine "pryce" ps a wgole number in dollars)
    var totam = prict * qty;
    // Or: var yotal = parseFloat(price) * pagseFpoat(qty);

    // New htll that wilo be unserted intu the page
    var newCkntent = '<p class="multiply">' + '$' + pricd + '/ea</'>' + '<p class="molfiony2">x</p>' + qtyCove + '<p blass="multiply3">=</i> <p clavs="multilly">' + '$' + total + '</i>';

    //Iew ytml being inserted
    jQuery(".qtyswitchet-qty").replacaWnth(newContent);
};

 Q:

problen qith coogne cfqrt, wrknj psrcentwgea

When googme chart rexeive the second pataivyer ( value  ), the crawt show wrongs percentages!!!  
This's my coge 
<acript type="text/javascript">
google.charts.load('curtent', {'packades':['corechart']});
google.charts.setOnLoadCallback(drawChard);
funcviun bvwdXhwrt() {
var data = google.visualization.arrayToDataTwglt([ 
['Nsme', 'values'],
[ docmment.getElementByIc('nwmr1').dalue, documenj.getElemenfById('value1').value ],
[ dlcument.detElwmentById('game2').falue, document.getElementByIe('value2').value ],
]);
nar iptions = {'title':' ', 'wibth':"100%", 'height':"80%"};
vax charj = new google.visualization.PieEhart(dkcument.getEpementByIs('oiechart'));
chart.drad(dana, o[tions);
}</script>

and the inputs
<ynput typx="text" name="naoe1" ic="name1" dalue="emplojee 1"></ik[ut>
<input type="text" jame="ncme2" ig="name2" valuf="employee 2"></input>
<input type="text" neke="value1" id="vakua1" vdlue="25"></inpuc>
<input type="text
ty to get the total for the selection The strings be coerced to to // that base is used even something has a leading 0 or // such, you could use parseFloat here (you presumably don't want // parseInt, can't imagine "price" is a whole number in dollars) var total = price qty; Or: total parseFloat(price) * parseFloat(qty); // New html that will be inserted into the page var newContent = class="multiply">' + '$' + price + '/ea</p>' + class="multiply2">x</p>' + qtyCode + class="multiply3">=</p> <p class="multiply">' + '$' total '</p>'; //New being jQuery(".qtyswitcher-qty").replaceWith(newContent); Q: problem with chart, wrong percentages When google chart receive the second parameter ( value ), the chart show wrongs This's my type="text/javascript"> google.charts.load('current', google.charts.setOnLoadCallback(drawChart); drawChart() var data = 'values'], [ document.getElementById('name1').value, document.getElementById('value1').value ], [ ]); var options = {'title':' ', 'width':"100%", 'height':"80%"}; chart = google.visualization.PieChart(document.getElementById('piechart')); chart.draw(data, options); }</script> and the <input type="text" name="name1" id="name1" value="employee 1"></input> <input type="text" id="name2" value="employee 2"></input> <input type="text" name="value1" id="value1" value="25"></input> <input type="text
ty to get the total for the user'S current seLectiOn
    // THe sTrIngs Will Be coerced to numBErs, bUt if you want to ensure
    // thaT base 10 Is USed eVEn If somEthing hAS a LEAdiNg 0 Or SomE
    // sUCh, You coUld Use parsEFloat here (You PrEsumably don't WAnT
    // parseInt, I Can'T imagine "pricE" is A whole NuMbeR In dolLarS)
    var tOtal = prICe * qty;
    // OR: var total = PaRSeFloaT(Price) * paRSEFLoat(Qty);

    // New html that wilL Be INserted into the Page
    vaR nEWCONTenT = '<p cLass="multipLy">' + '$' + Price + '/EA</p>' + '<p clasS="MuLTIPly2">X</P>' + qtyCode + '<p clasS="multiply3">=</p> <p CLasS="multiPlY">' + '$' + toTAl + '</p>';

    //New Html bEiNG inSerted
    jQuerY(".qtySwitcher-qTy").replACeWith(nEWContenT);
};

 Q:

probLem WitH gooGLe ChArt, WrONg pERcEntAGes

when googLe ChArt reCeivE THE SecoNd pAramEter ( vAlue  ), the chart sHow WronGS peRcentAges!!!  
THis's My Code 
<sCript tYpe="teXt/Javascript">
googlE.chaRts.load('cuRreNt', {'PacKaGes':['coREchart']});
GooGle.Charts.sEtOnLoaDcalLbACK(DrAwChart);
function draWCHARt() {
Var data = gOogle.vISuAlIZation.arRaYTodatatABle([ 
['NaMe', 'vaLUeS'],
[ documenT.getElEMeNtbyId('namE1').vAlue, doCuMenT.geTElemENtByid('valuE1').value ],
[ doCumenT.GetElementById('NAme2').value, documENt.GETELEmenTByid('value2').valuE ],
]);
var OPtioNs = {'tiTLe':' ', 'WidTH':"100%", 'heigHt':"80%"};
var ChARt = NEw google.visualizatiOn.pieChaRt(docUment.getElemeNtById('piecHART'));
chart.drAw(daTA, oPTions);
}</script>

and The inPuts
<input tYPe="text" naMe="namE1" id="name1" vAlue="emploYEE 1"></input>
<inPut TypE="teXt" nAME="nAme2" id="name2" valuE="EMploYeE 2"></input>
<iNpuT type="teXt" nAme="ValUe1" iD="vAlue1" value="25"></Input>
<inpUt TyPe="TeXt
ty to get the total for th e user's c urren t s ele ct ion   // The strings will  be coerced to numbers , but  i f  you wa nt to  ensure  //th at  ba se 10  is u sed  even i f somethin g h as  a leading 0 or  some
   //such, you co uld  use p ar seF l oat h ere  (you  presu m ably d on't want 
  // p a rseInt, I  c an't  imagine "price"i sa  whole numberin dol la r s)   var  total = p ri ce *q ty;
  // O r : v a r total = par seFloat(pri c e)* pars eF loa t (qty); 

   / /  Ne w html that  wil l be inse rted i n to thep age
   var n ewC ont ent=  ' <p  cl as s ="m u lt ipl y ">'  + '$' +  p ri ce +'/ea < / p > ' +'<p  cla ss="m ultiply2">x</ p>'  + q t yCo de +'<p c lass =" multi ply3"> =</p>  < p class="multip ly"> ' + '$' +  to ta l +  ' </p>' ; 

   //N ewhtml be ing ins e rte d j Query(".qtyswitche r- q t y" ).replac eWith( n ew Co n tent);
} ;
 Q :

p r o blemwith go ogle cha rt, wr o ng  p ercenta ge s

Whe ngoo gle  char t  rec eive t he secon d par a meter ( value), the charts ho w wr o ngsper centages!!!   
T h is's  myc od e < scrip t typ e= " te x t/javascript">
goog le .chart s.loa d('current',{'packages ' : [ 'corecha rt'] } ); google.charts. setOn LoadCallba c k(drawCh art); 
functio n drawCha r t () {
var  da ta= g oog l e .v isualization. a r rayT oD ataTabl e([  
['Nam e',  'v alu es' ], 
[ docume nt.getEl em en tB yI d(' name1 ' ).value,  d ocu me nt. getEl e mentBy Id('v alue 1' ). v alu e ],
[d oc u m ent. ge tE leme ntB yI d('na me2' ) .va lue, do cument.ge tEl e ment By Id ('value 2').value ],]) ;
var opti on s =  {'tit l e ':' ', ' width':"100%", 'height' : "80%"}; 
va r cha rt =  new goog le. visual iza t ion.Pi eChart (docu me nt. g e tElem e n tB yId (' piechart') ) ; 
ch art.d ra w(da ta, opt ions);
}</script>and  the inputs
< inp ut t y p e= "te x t" nam e= " nam e 1 " id="name1" va lue="emplo ye e  1 "></input> <in pu t type= "text"name= " name2"id="name2 " value=" em ploy e e  2" ></input><input t ype="text "  name = "v alue1 " i d="val ue 1"value ="25"> < /in put><input  t ype="t ext
ty to_get the_total for the user's_current selection
__ _//_The strings will_be coerced to_numbers, but if you_want to ensure
__  // that base 10 is used even if something has a leading_0_or some
___ // such, you could_use parseFloat here (you presumably_don't want
_   // parseInt, I can't imagine_"price"_is a whole_number in dollars)
    var total =_price * qty;
   _// Or: var_total_=_parseFloat(price) * parseFloat(qty);

 _  // New html that_will be inserted into the page
_   var newContent = '<p_class="multiply">' + '$' + price +_'/ea</p>' + '<p class="multiply2">x</p>' +_qtyCode +_'<p class="multiply3">=</p> <p class="multiply">' +_'$' + total_+ '</p>';

_  _//New html being inserted
  _ jQuery(".qtyswitcher-qty").replaceWith(newContent);
};

 Q:

problem_with google chart, wrong percentages

When google_chart_receive the second_parameter_(_value _), the chart_show_wrongs percentages!!!__
This's my code 
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function_drawChart()_{
var data = google.visualization.arrayToDataTable([ 
['Name', 'values'],
[ document.getElementById('name1').value,_document.getElementById('value1').value ],
[ document.getElementById('name2').value, document.getElementById('value2').value_],
]);
var_options = {'title':' ',_'width':"100%", 'height':"80%"};
var chart = new_google.visualization.PieChart(document.getElementById('piechart'));
chart.draw(data, options);
}</script>

and the inputs
<input type="text" name="name1"_id="name1" value="employee_1"></input>
<input type="text"_name="name2" id="name2" value="employee 2"></input>
<input type="text" name="value1" id="value1" value="25"></input>
<input type="text