Jump to content

Search the Community

Showing results for tags 'number'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Found 6 results

  1. Hi I have a question, but no real example yet. I wonder if someone can tell how to create a serial number that counts from 10000 to 100000 en divide it as a unique id over several databases and table.columns? I dont want to have an example with uniqid() , but counting up with one. I have no clue how to do this can someone please give any suggestion?
  2. I want to get the value that is in the center between three values. For example: Math."middle"(34.78, 56.12, 45.54) Result in: 45.54 How I can do this?
  3. Yes I'm a newbie in AJAX '&&' JavaScript. As I'm a pupil here, I find hurdle almost in any code... There is an AJAX code with some number value in it, like 4 - 200, but I can't understand the nature of this digits or what they are indicating... function loadDoc() { var xhttp; if (window.XMLHttpRequest) { // code for modern browsers xhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xhttp.onreadystatechange = function() { if (xhttp.readyState == 4 && xhttp.status == 200) { document.getElementById("demo").innerHTML = xhttp.responseText; } You see: "== 4 && xhttp.status == 200)" ... what for? Thanks to anyone who'll reply to this 'double-dumb' question!!
  4. Hi! My problem is that I've made a function with "var kgTotales = 0". But when I sum "kgTotales = kgTotales + 2" the result is "02", it returns a string and not a number. I use this var in a bucle so the result is "kgTotales = 02...." and next to it the next numbers I want to sum. This is the code: <script type="text/javascript"> function multiplicar() { var contador1; var contador2 = 2; var contador3 = 1; var n1; var n2; var id1; var id2; var id3; var kgTotales = 0; var precioTotal = 0; for(contador1=1; contador1 < 60; (contador1)+2){ id1="n" +(contador1); id2="n" +(contador2); id3="result" +(contador3); contador1=(contador1)+2; contador2=(contador2)+2; contador3++; n1=document.getElementById(id1).value; n2=document.getElementById(id2).value; document.getElementById(id3).value = (n1*n2); precioTotal = precioTotal + (n1*n2); kgTotales = kgTotales+n2; document.getElementById("precioTotal").value = precioTotal + " Euros"; document.getElementById("kgTotales").value = kgTotales + " Kg"; } } </script> And this is the result: I don't understand why it happens because precioTotal is a similar var and also shows a sum and works well. I hope someone could helps me. Regards!
  5. I know mobile phone browsers have this feature but is it possible for desktop computers? For example, I have a large excel file in skydrive full of phone numbers and instead of manually dialing the numbers I want to click the numbers to open skype or gmail's call phone feature and automatically call the number.
  6. Trying to write a script that will check the value in the form is a number between the range of 1 to 99999. 1) The script work mostly except for two things if you put a number then letter it won’t detect that you entered letters as well as numbers 2) I want it to run the script on onblur event, however every time I try the script does not work at all. Did study java years and year ago and found I forgotten most things if people can point out where I am going wrong would be very greatful <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type" /><title>Please enter your age</title><script language="JavaScript1.2">function checknumber(){var x=document.checknum.pnum.value/*does it contain non digits */var anum=/(^\D+$)|(^\D+\.\D+$)/if (anum.test(x)){alert("Please input a valid Runner ID between 1 to 99999 !")testresult=false}/*is it above 99999*/else if (x > 99999){alert("Please input a valid Runner ID between 1 to 99999 !")testresult=false}/*is it below 1*/else if (x < 1){alert("Please input a valid Runner ID between 1 to 99999 !")testresult=false}return (testresult)}</script></head><body><form name="checknum" onSubmit="return checknumber()">Please input a valid Runner ID between 1 to 99999:<input type="text" name="pnum" onchange="checknumber()"><input type="submit" value="Submit"></form></body></html> Many Thanks Damien
  • Create New...