1 Input/Alert Box help Tue Dec 15, 2009 12:46 pm
Mario
Registered Member
I need some help in javascript.
I need to know how to make a text area turn into an alert box so what ever you typed will be displayed in the alert box.
I also need to know how to make an input field so when you input a month/year it will show up on the table.
The code that I am using for this is
Thanks
I need to know how to make a text area turn into an alert box so what ever you typed will be displayed in the alert box.
I also need to know how to make an input field so when you input a month/year it will show up on the table.
The code that I am using for this is
- Code:
<html>
<title>
Webscripting Final
</title>
<script type="text/javascript">
{
var x;
var class10 = new Array();
class10[0] = 'Economics';
class10[1] = 'ShakeSpeare';
class10[2] = 'College Math Prep';
class10[3] = 'Webscripting';
var time = new Array();
time[0] = ' 7:30-9:08';
time[1] = ' 9:16-11:05';
time[2] = ' 11:10-12:00';
time[3] = ' 12:30-1:50';
var room = new Array();
room[0] = ' C-16';
room[1] = ' D-6';
room[2] = ' P-7';
room[3] = ' R-135';
var numberofcredits = new Array();
numberofcredits[0]='.5';
numberofcredits[1]='1';
numberofcredits[2]='1';
numberofcredits[3]='2';
//alert(room[0]);
document.write('<table border="2" cellspacing="6" cellpadding="26" align="center">');
document.write('<tr><td colspan="4" cellspacing="6" cellpadding="26"><center>Cibola High School</center></td></tr>');
for (x = 0; x <= 3; x++) {
document.write("<tr><td>"+class10[x]+"</td><td>"+room[x]+"</td><td>"+time[x]+"</td><td>"+numberofcredits[x]+"</td></tr>");
}
document.write('<tr><td colspan="4"><center>My Graducation May 16, 2010</center></td><tr>');
document.write('</table>');
}
</script>
<body>
<br />
<center><select>
<option value="Pick a class">Pick as class</option>
<option value="Economics">Economics</option>
<option value="ShakeSpeare">ShakeSpeare</option>
<option value="College Math Prep">College Math Prep</option>
<option value="Webscripting">Webscripting</option>
</select></center>
</body>
</html>
Thanks