dcsimg
www.webdeveloper.com

Search:

Type: Posts; User: wbport

Page 1 of 18 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    12
    Views
    2,956

    Also, you need to ask for month and day as well. ...

    Also, you need to ask for month and day as well. If their birthday is later in the year or later in the current month, their age will be the difference between the current year and birth year minus...
  2. Replies
    10
    Views
    1,797

    Well have at. You have what you need to change...

    Well have at. You have what you need to change the size of the random number and number of tries. You can even change the for loop so the value of your loop counter can appear in the prompt.
    ...
  3. Replies
    10
    Views
    1,797

    This was what I came up with a few years ago....

    This was what I came up with a few years ago.
    <html>
    <head>
    <title>Guess Number</title>
    <script language="JavaScript">
    function UserGuess () {
    var numGuess = Math.floor(Math.random()*1000) +...
  4. Replies
    10
    Views
    1,797

    You only need 9 guesses to find anything from 1...

    You only need 9 guesses to find anything from 1 to 500 (or 512).

    I would suggest a prompt that has the result of the last guess such as "125 was too low. Next guess: ". If you do this in a for...
  5. Replies
    2
    Views
    1,226

    That's beyond what JavaScript can do since it is...

    That's beyond what JavaScript can do since it is client-side only. You can't hide your source code so anyone with enough time and know-how can login, regardless of how many hoops you make them jump...
  6. Replies
    6
    Views
    1,364

    \\.\ Makes a good point: When are you going to...

    \\.\ Makes a good point: When are you going to show how you are attempting to solve this?

    After you have tried everything you can think of or have reached your brick wall, this forum can be an...
  7. Replies
    6
    Views
    1,364

    This shows one way to split separate lines in a...

    This shows one way to split separate lines in a text area into an array.


    tempField=document.penta.UPstaff.value;
    tempField=tempField.replace(/\r/g,"");
    var lineU=tempField.split("\n"); ...
  8. Replies
    6
    Views
    1,364

    I would start by running your first and second...

    I would start by running your first and second text areas through a split() function, breaking on a line feed or carriage return, creating a pair of arrays. Varying a subscript from zero by one...
  9. Replies
    6
    Views
    1,270

    This is one idea: function calculate() { ...

    This is one idea:

    function calculate() {
    var n = document.tournform.NoPlayers.value;
    var deck = new Array();
    var shuffle = new Array();
    var OutText = "";

    // Check that the...
  10. Something like (have not tested this) do { ...

    Something like (have not tested this)

    do {
    var x=prompt("Enter option 1, 2, or 3","") }
    until ((!isNaN(x) && (x > 0) && (x < 4));

    Use of prompt() is on the decline, but it is a good place...
  11. One idea is a "do .... until" loop with the...

    One idea is a "do .... until" loop with the first condition being (!isNaN) of the prompted variable, perhaps anded with other conditions to be sure the option is within your range.

    Jednym z...
  12. Replies
    8
    Views
    2,489

    jQuery To create a list of consecutive numbers in random...

    To create a list of consecutive numbers in random order, use a second array, example deck.

    for (i=0; i < 15; i++) deck[i]=i+1
    Your next for statement should probably be from the top down. To get...
  13. Replies
    10
    Views
    3,947

    You take the square root of "b-squared minus 4ac"...

    You take the square root of "b-squared minus 4ac" and isn't it, you have 4AC minus 1 plus b-squared. Try "BA -4*A*C" or "(4*A*C*-1+BA)" instead.
  14. Thread: CoTangent

    by wbport
    Replies
    4
    Views
    1,115

    Do you mean arctangent instead of cotangent? It...

    Do you mean arctangent instead of cotangent? It looks like you already have the ratio of the sides and want the angle.

    Math.atan2(x,y) * 180 / pi

    or just Math.atan(r) if you already have...
  15. Thread: DevX Tip Bank

    by wbport
    Replies
    0
    Views
    541

    DevX Tip Bank

    Where do posts for a JavaScript suggestion go in the DevX Tip Bank?
  16. Check for onblur perhaps?

    Check for onblur perhaps?
  17. I only have a few pages that open another window...

    I only have a few pages that open another window (albeit for display only), but I don't have a problem with the window not staying open until the user closes it. These are the last few lines in the...
  18. Replies
    22
    Views
    4,872

    I deleted my first post since it seemed too much...

    I deleted my first post since it seemed too much ego trip and too little addressing your question. My web site is home.comcast.net, but look quickly since comcast will pull the plug on hobby (client...
  19. Replies
    22
    Views
    4,872

    If you are looking for a toggle button try: ...

    If you are looking for a toggle button try:

    <!DOCTYPE html>
    <head>
    <title>Toggle Demo</title>
    <script language="JavaScript">
    </html>var sw1
    function startup() {
    ...
  20. Replies
    22
    Views
    4,872

    Deleted by author.

    Deleted by author.
  21. Replies
    8
    Views
    1,739

    Save variables as cookies?

    Save variables as cookies?
  22. Replies
    9
    Views
    2,288

    number of milliseconds before or since Jan 1,...

    number of milliseconds before or since Jan 1, 1970 0:00 GMT
  23. Replies
    9
    Views
    2,288

    They are integers. See the first sentence of my...

    They are integers. See the first sentence of my last post.
  24. Replies
    9
    Views
    2,288

    Time is processed with the number of milliseconds...

    Time is processed with the number of milliseconds before or since Jan 1, 1970 0:00 GMT. There are a number of related functions to read or modify month, day, year, day of week, day of year, or hour,...
  25. Replies
    9
    Views
    2,288

    That's the number of milliseconds between those...

    That's the number of milliseconds between those two dates.
Results 1 to 25 of 426
Page 1 of 18 1 2 3 4
HTML5 Development Center



Recent Articles