auto input number to output(help please thanks in advance!)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • david

    auto input number to output(help please thanks in advance!)

    HI!

    Im trying to make "HTML form" into automatic.

    1. If I get 18 numbers like: A B C D E F . . . .

    2. How can I put those 18 numbers automatically into 6 numbers format
    like:

    A B C D E F
    A C E G H J
    A F H I K L

    Here is HTML code so far I wrote, please help me:

    <html>
    <head>
    <title></title>
    </head>
    <body>

    <form1>
    A:<input type="text" name="A" size="2">
    B:<input type="text" name="B" size="2">
    C:<input type="text" name="C" size="2">
    D:<input type="text" name="D" size="2">
    E:<input type="text" name="E" size="2">
    F:<input type="text" name="F" size="2">
    G:<input type="text" name="G" size="2">
    H:<input type="text" name="H" size="2">
    I:<input type="text" name="I" size="2">
    J:<input type="text" name="J" size="2">
    K:<input type="text" name="K" size="2">

    </form1>


    <input type ="submit" value="calculat e">

    <p>
    <form2>
    1:<input type="text" name="A" size="2">&nbsp; <input type="text"
    name="B" size="2">&nbsp; <input type="text" name="C"
    size="2">&nbsp; <input type="text" name="D" size="2">&nbsp; <input
    type="text" name="E" size="2">&nbsp; <input type="text" name="F"
    size="2">
    </P>

    <p>
    2:<input type="text" name="A" size="2">&nbsp; <input type="text"
    name="B" size="2">&nbsp; <input type="text" name="E"
    size="2">&nbsp; <input type="text" name="F" size="2">&nbsp; <input
    type="text" name="G" size="2">&nbsp; <input type="text" name="H"
    size="2">
    </p>

    <p>
    3:<input type="text" name="A" size="2">&nbsp; <input type="text"
    name="B" size="2">&nbsp; <input type="text" name="H"
    size="2">&nbsp; <input type="text" name="I" size="2">&nbsp; <input
    type="text" name="J" size="2">&nbsp; <input type="text" name="K"
    size="2">
    </p>

    </body>
    </html>
  • kaeli

    #2
    Re: auto input number to output(help please thanks in advance!)

    In article <21821d39.03081 32336.14cb5a63@ posting.google. com>, davidy78
    @yahoo.com enlightened us with...[color=blue]
    > HI!
    >
    > Im trying to make "HTML form" into automatic.
    >
    > 1. If I get 18 numbers like: A B C D E F . . . .
    >[/color]

    Those are letters.
    [color=blue]
    > Here is HTML code so far I wrote, please help me:
    >[/color]

    This is invalid code.
    [color=blue]
    > <html>
    > <head>
    > <title></title>
    > </head>
    > <body>
    >
    > <form1>[/color]

    <form name="form1">
    [color=blue]
    > A:<input type="text" name="A" size="2">
    > B:<input type="text" name="B" size="2">
    > C:<input type="text" name="C" size="2">
    > D:<input type="text" name="D" size="2">
    > E:<input type="text" name="E" size="2">
    > F:<input type="text" name="F" size="2">
    > G:<input type="text" name="G" size="2">
    > H:<input type="text" name="H" size="2">
    > I:<input type="text" name="I" size="2">
    > J:<input type="text" name="J" size="2">
    > K:<input type="text" name="K" size="2">
    >
    > </form1>
    >[/color]
    </form>[color=blue]
    >
    > <input type ="submit" value="calculat e">[/color]

    Why have a submit button that does nothing? You gave no action to your
    form. This button does nothing.
    [color=blue]
    >
    > <p>
    > <form2>[/color]

    <form name="form2">[color=blue]
    > 1:<input type="text" name="A" size="2">&nbsp; <input type="text"
    > name="B" size="2">&nbsp; <input type="text" name="C"
    > size="2">&nbsp; <input type="text" name="D" size="2">&nbsp; <input
    > type="text" name="E" size="2">&nbsp; <input type="text" name="F"
    > size="2">
    > </P>
    >
    > <p>
    > 2:<input type="text" name="A" size="2">&nbsp; <input type="text"
    > name="B" size="2">&nbsp; <input type="text" name="E"
    > size="2">&nbsp; <input type="text" name="F" size="2">&nbsp; <input
    > type="text" name="G" size="2">&nbsp; <input type="text" name="H"
    > size="2">
    > </p>
    >
    > <p>
    > 3:<input type="text" name="A" size="2">&nbsp; <input type="text"
    > name="B" size="2">&nbsp; <input type="text" name="H"
    > size="2">&nbsp; <input type="text" name="I" size="2">&nbsp; <input
    > type="text" name="J" size="2">&nbsp; <input type="text" name="K"
    > size="2">
    > </p>[/color]
    </form>


    Now what did you want this to actually do?
    The question didn't make sense to me.

    If this is your homework, post the actual question.

    -------------------------------------------------
    ~kaeli~
    Why do people who know the least know it the loudest?
    If that cell phone was up your a$$, maybe you could
    drive a little better!


    -------------------------------------------------

















    Comment

    • Yep

      #3
      Re: auto input number to output(help please thanks in advance!)

      davidy78@yahoo. com (david) wrote in message news:<21821d39. 0308132336.14cb 5a63@posting.go ogle.com>...
      [color=blue]
      > Im trying to make "HTML form" into automatic.
      >
      > 1. If I get 18 numbers like: A B C D E F . . . .
      >
      > 2. How can I put those 18 numbers automatically into 6 numbers format
      > like:
      >
      > A B C D E F
      > A C E G H J
      > A F H I K L[/color]

      <script type="text/javascript">
      var b=["<p>"], s="<input type='text' size='2' name='~'>";
      for(var ii=0, n=4; ii<18; ii++){
      b.push(s.replac e(/~/, String.fromChar Code(65+ii)));
      if(ii>n) n+=6, b.push("<\/p><p>");
      }
      b.push("<\/p>");
      document.write( b.join(""));
      </script>


      (Kaeli, thanks for your famous crystal ball, works great!)

      Comment

      • kaeli

        #4
        Re: auto input number to output(help please thanks in advance!)

        In article <d2d855ea.03081 41039.a547799@p osting.google.c om>, y-
        e.perio@em-lyon.com enlightened us with...[color=blue]
        >
        >
        > (Kaeli, thanks for your famous crystal ball, works great!)
        >[/color]

        LOL

        --
        -------------------------------------------------
        ~kaeli~
        Why do people who know the least know it the loudest?
        If that cell phone was up your a$$, maybe you could
        drive a little better!


        -------------------------------------------------

        Comment

        Working...