By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,680 Members | 1,500 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,680 IT Pros & Developers. It's quick & easy.

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

P: n/a
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="calculate">

<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>
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
In article <21**************************@posting.google.com >, davidy78
@yahoo.com enlightened us with...
HI!

Im trying to make "HTML form" into automatic.

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

Those are letters.
Here is HTML code so far I wrote, please help me:

This is invalid code.
<html>
<head>
<title></title>
</head>
<body>

<form1>
<form name="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>
</form>
<input type ="submit" value="calculate">
Why have a submit button that does nothing? You gave no action to your
form. This button does nothing.

<p>
<form2>
<form name="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>

</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!
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
-------------------------------------------------





Jul 20 '05 #2

P: n/a
Yep
da******@yahoo.com (david) wrote in message news:<21**************************@posting.google. com>...
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


<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.replace(/~/, String.fromCharCode(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!)
Jul 20 '05 #3

P: n/a
In article <d2*************************@posting.google.com> , y-
e.*****@em-lyon.com enlightened us with...


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


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!
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
-------------------------------------------------
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.