Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-08-2008, 10:40 PM   PM User | #1
needMajorHelp
New to the CF scene

 
Join Date: Oct 2008
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
needMajorHelp is an unknown quantity at this point
Exclamation This array won't print, help!

I have a .js file with the arrays and an html file for the web page. The arrays won't print. The idea is to have a check box with the statement next to it. I save the statements as arrays because the same statement might be used by many different pages.

In the javascript file:
//Conditions
var condition= new Array();
condition[0]="certain RADIO-ACTIVE RELEASE/HAZARD";
condition[1]="certain BIOLOGICAL RELEASE / HAZARD";
condition[2]="certain CHEMICAL OR SOLVENT HAZARD";
condition[3] "certain TOXIC FUMES RELEASE/HAZARD";
condition[4]="Personal injury, illness, or exposure";
condition[5]="Multiple injuries, illnesses, or exposures";
condition[6]="Experience irritation, coughing, burning eyes, difficulty breathing";

//Security and Evacuation
var security=new Array();
security[0]= "Evacuate Immediate Vicinity";
security[1]= "Evacuate Building";
security[2]= "Evacuate Campus";
security[3]= "Secure the immediate area";
security[4]= "Secure the zone";
security[5]= "Limit access to authorized personnel";
security[6]= "Do not re-enter the area until advised by emergency personnel";


In the html file:

<html>
<head>
<script type="text/javascript" src="list.js"></script>
</head>
<body>
<script type="text/javascript">
document.write("<h1>Hazardous Material Response</h1>");
document.write("<table>");
document.write("<tr>");
document.write("<td>");
document.write("<input type=\"checkbox\" name=\"condition\" id=\"c1\">");
document.write(condition[1]);
document.write("</td>");
document.write("<td>");
document.write("</tr>");
document.write("</table>");
</script>
</body>
</html>
needMajorHelp is offline   Reply With Quote
Old 12-09-2008, 03:40 AM   PM User | #2
rangana
Senior Coder

 
rangana's Avatar
 
Join Date: Feb 2008
Location: Cebu City, Philippines
Posts: 1,752
Thanks: 65
Thanked 372 Times in 365 Posts
rangana will become famous soon enoughrangana will become famous soon enough
Code:
var condition= new Array();
condition[0]="certain RADIO-ACTIVE RELEASE/HAZARD";
condition[1]="certain BIOLOGICAL RELEASE / HAZARD";
condition[2]="certain CHEMICAL OR SOLVENT HAZARD";
condition[3]="certain TOXIC FUMES RELEASE/HAZARD";
condition[4]="Personal injury, illness, or exposure";
condition[5]="Multiple injuries, illnesses, or exposures";
condition[6]="Experience irritation, coughing, burning eyes, difficulty breathing";
__________________
Learn how to javascript at 02geek

The more you learn, the more you'll realize there's much more to learn
Ray.ph
rangana is offline   Reply With Quote
Old 12-09-2008, 05:41 AM   PM User | #3
needMajorHelp
New to the CF scene

 
Join Date: Oct 2008
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
needMajorHelp is an unknown quantity at this point
is that the only reason why it won't print?



oye..

thankyou!

needMajorHelp is offline   Reply With Quote
Reply

Bookmarks

Tags
array won't print

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:35 AM.


Advertisement
Log in to turn off these ads.