Click here to Skip to main content
15,888,733 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: PHP to CLASSIC ASP VB CODE Pin
hifiger200431-May-07 22:13
hifiger200431-May-07 22:13 
GeneralRe: PHP to CLASSIC ASP VB CODE Pin
Christian Graus31-May-07 23:18
protectorChristian Graus31-May-07 23:18 
QuestionProblem with printing table of data in the aspx web page... Pin
pradeep kumarappagari30-May-07 20:22
pradeep kumarappagari30-May-07 20:22 
QuestionRSS feed Pin
Newbie_dydy8530-May-07 11:38
Newbie_dydy8530-May-07 11:38 
AnswerRe: RSS feed Pin
MatrixCoder30-May-07 12:03
MatrixCoder30-May-07 12:03 
QuestionCSS 3 alpha stuff Pin
Alaric_30-May-07 8:06
professionalAlaric_30-May-07 8:06 
AnswerRe: CSS 3 alpha stuff Pin
Johnny ²30-May-07 14:59
Johnny ²30-May-07 14:59 
QuestionJavascript Mathematic Bug. [modified] Pin
Pinhead_Me30-May-07 7:43
Pinhead_Me30-May-07 7:43 
OK. I have tested this in IE 6 & 7 and FireFox and got the same results.
Adding these terms "t2 = 3.43 + 10.00 + 3.33;" produces an incorrect value. Expected value is 16.76, but we get 16.759999999999998. Copy and paste the html code below in notepad and save as an HTML file and run. Oddly, if you swap the first and last terms, you get the expected value. Any thoughts?

<html>
<script>
function Add()
{
var t = 0.0;
var val_1 = document.getElementById('val_1');
var val_2 = document.getElementById('val_2');
var val_3 = document.getElementById('val_3');
var total = document.getElementById('Total');

t = parseFloat(val_1.value) + parseFloat(val_2.value) + parseFloat(val_3.value);

total.value = t;

var t2 = 0;
t2 = 3.43 + 10.00 + 3.33;
//Switching the first and last term produces the correct value
//t2 = 3.33 + 10.00 + 3.43;
//alert(t2);
}

</script>

<input type="text" id="val_1" value="3.43"> +
<input type="text" id="val_2" value="10.00"> +
<input type="text" id="val_3" value="3.33"> = <input type="text" id="Total" value="">
<BR>
<input type="button" id="val_2" value="Add" onclick="Add();">
<BR><BR>
Another Test:
Switch 3.43 and 3.33 ("3.33 + 10.00 + 3.43") values and you get the correct value.
</html>


-- modified at 14:00 Wednesday 30th May, 2007
JokeRe: Javascript Mathematic Bug. Pin
JimmyRopes30-May-07 8:30
professionalJimmyRopes30-May-07 8:30 
GeneralRe: Javascript Mathematic Bug. Pin
Pinhead_Me30-May-07 10:42
Pinhead_Me30-May-07 10:42 
GeneralRe: Javascript Mathematic Bug. Pin
JimmyRopes30-May-07 12:52
professionalJimmyRopes30-May-07 12:52 
AnswerRe: Javascript Mathematic Bug. Pin
Christian Graus30-May-07 11:59
protectorChristian Graus30-May-07 11:59 
GeneralRe: Javascript Mathematic Bug. Pin
Pinhead_Me30-May-07 12:29
Pinhead_Me30-May-07 12:29 
GeneralRe: Javascript Mathematic Bug. Pin
Christian Graus30-May-07 13:27
protectorChristian Graus30-May-07 13:27 
GeneralRe: Javascript Mathematic Bug. Pin
Fred_Smith30-May-07 13:37
Fred_Smith30-May-07 13:37 
GeneralRe: Javascript Mathematic Bug. Pin
Pinhead_Me30-May-07 13:41
Pinhead_Me30-May-07 13:41 
GeneralRe: Javascript Mathematic Bug. Pin
Christian Graus30-May-07 20:25
protectorChristian Graus30-May-07 20:25 
GeneralRe: Javascript Mathematic Bug. Pin
Fred_Smith30-May-07 21:46
Fred_Smith30-May-07 21:46 
GeneralRe: Javascript Mathematic Bug. Pin
Christian Graus30-May-07 22:17
protectorChristian Graus30-May-07 22:17 
GeneralRe: Javascript Mathematic Bug. Pin
Fred_Smith30-May-07 22:22
Fred_Smith30-May-07 22:22 
AnswerRe: Javascript Mathematic Bug. Pin
Guffa30-May-07 22:55
Guffa30-May-07 22:55 
QuestionShow ftp directly in windows explorer in a web page using frames Pin
arr.cpp30-May-07 5:13
arr.cpp30-May-07 5:13 
QuestionCustom Scroll on ASP.NET Panel Pin
L Viljoen30-May-07 2:40
professionalL Viljoen30-May-07 2:40 
AnswerRe: Custom Scroll on ASP.NET Panel Pin
RichardGrimmer30-May-07 5:54
RichardGrimmer30-May-07 5:54 
GeneralRe: Custom Scroll on ASP.NET Panel Pin
L Viljoen30-May-07 20:15
professionalL Viljoen30-May-07 20:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.