onclick="document.getElementById('specialyes').style.display=''"

Hi Expert,

I have a code is working for a random selection but it doesn't work for the selection and I don't know how to to do it... .  

When the user select "Employer/Private/Transportation " I want this to show how can u help.

I WANT THIS FIELD TO SHOW IN THE NEXT LINE
Employer/Private/Transportation
>>>>>>>Do you hire apprentices at the present time      (  ) YES     (  ) NO

Please take a look on the form at this url :

http://www.caf-fca.org/en/reports/test.asp 



Industry Category: Employer/Private/Transportation (Do you hire apprentices at the present time):
<body>
<table><tbody><tr><td>
<form style="100%" name="YourFormName" method="Post" action="cf_employer_participation.asp" onSubmit="return checkForm(this);">
            <DIV class=right_block>
            <DIV class=highligts><font color="red"><b>*</b></font> denotes required field</DIV>            
           <DIV class=item><SPAN class=title><b><font color="red"><b> * </b></font><font color="#FF0000">Industry category : a field should show if Employer/Private/Transport was selected how like the random below</font></SPAN>
		<SELECT name="industrycategory" class=f-textName>
        <OPTION value="" selected class=f-textName>Select One</OPTION>
        <OPTION value="Employer/Private/Construction" class=f-textName>Employer/Private/Construction</OPTION>
        <OPTION value="Employer/Private/Manufacturing" class=f-textName>Employer/Private/Manufacturing</OPTION>
        <OPTION value="Employer/Private/Service" class=f-textName>Employer/Private/Service</OPTION>
        <OPTION value="Employer/Private/Transportation" class=f-textName>Employer/Private/Transportation</OPTION>
        <OPTION value="Employer Public Sector" class=f-textName>Employer Public Sector</OPTION>
        <OPTION value="Educators High School" class=f-textName>Educators High School</OPTION>       
        <OPTION value="Other" class=f-textName>Other</OPTION></SELECT></DIV>
		   <DIV class=item><SPAN class=title><b><font color="red"><b> * </b></font>Other Industry category : </SPAN><input  name="othertxt" type="text" id="othertxt" size="40"></DIV>
        <DIV class=item><SPAN class=title><b><font color="red"><b> * </b></font>Province/Territory :</SPAN> 
        <SELECT name="txtprovince" class=f-textName>
        <OPTION value="" selected>Select One</OPTION>
        <OPTION value=AB class=f-textName>Alberta</OPTION>
        <OPTION value=BC class=f-textName>British Columbia</OPTION>
        <OPTION value=MB class=f-textName>Manitoba</OPTION>
        <OPTION value=NB class=f-textName>New Brunswick</OPTION>
        <OPTION value=NF class=f-textName>Newfoundland and Labrador</OPTION>
        <OPTION value=NT class=f-textName>Northwest Territories</OPTION>
        <OPTION value=NS class=f-textName>Nova Scotia</OPTION>
        <OPTION value=NU>Nunavut</OPTION>
        <OPTION value=ON class=f-textName>Ontario</OPTION>
        <OPTION value=PE>Prince Eard Island</OPTION>
        <OPTION value=QC class=f-textName>Québec</OPTION>
        <OPTION value=SK class=f-textName>Saskatchewan</OPTION>
        <OPTION value=YK>Yukon Territory</OPTION>
        <OPTION value=Other class=f-textName>Other</OPTION></SELECT></DIV>
      <DIV class="item last"><SPAN class=title><b><font color="red"><b> * </b></font>Purpose</b><font size="-2"><br>(Please briefly outline your outreach efforts for our office to track the distribution of this material)</font></font></SPAN><br><textarea name="purpose" rows="4" cols="35"></textarea></DIV>            
       <div align="center"><INPUT class=butt title="Send" type="submit" alt="Send" src="" value="Send">
      <INPUT class=butt title="Reset" type="reset" alt="reset" src="" value="Reset">
      
       <INPUT type=hidden 
      value=cmVxVzdGZvcnF1b3RlX2Zvcm1fbmFtZSxyZXF1ZXN0Zm9ycXVvdGVfZm9ybV9tZXNzYWdlLHJlcXVlc3Rmb3Jx90ZV9mb3JtX2VtYWlsLHJlcXVlc3Rmb3Jx90ZV9mb3JtX3Bob25lLHJlcXVlc3Rmb3Jx90ZV9mb3JtX2NvbXBhbnkscmVxVzdGZvcnF1b3RlX2Zvcm1fZmlsZSxyZXF1ZXN0Zm9ycXVvdGVfZm9ybV9hZGRpbmZv 
      name=_it_fs></FORM></div>
      </em></DIV></DIV></TD></TR>
	  <TR>
    <TD colSpan=2>
<strong><font color="#0066FF">This one is working i want the above one to work in the selection box. CLICK YES TO TEST IT :)</font></strong><br>
    Industry Category: Employer/Private/Transportation (Do you hire apprentices at the present time):
     <INPUT class=button2 
                              onclick="document.getElementById('specialyes').style.display=''" 
                              tabIndex=30 type=radio 
                              value="1" name=specialreq>
     Yes <INPUT class=button2 
                              onclick="document.getElementById('specialyes').style.display='none'" 
                              tabIndex=30 type=radio 
                              value="0" name=specialreq>
     No <SPAN id=specialyes style="DISPLAY: none"><br>
                              <SPAN class=description_text><B>Please specify:</b></span>
                                    <input  name="othertxt" type="text" id="othertxt" size="40">
</TD></TR></TBODY></TABLE></DIV></DIV><br><br><Br>
      <DIV style="PADDING-BOTTOM: 5px">The reports/documents listed on this page reflect the opinion of the individual authors and do not necessarily reflect the opinions of the Canadian Apprenticeship Forum  Forum canadien sur lapprentissage (CAF-FCA).</DIV>
      </DIV><BR><BR>
<BR><BR><BR></DIV></DIV>
</body>
</html>

Open in new window

elieazziAsked:
Who is Participating?
 
erikTsomikConnect With a Mentor System Architect, CF programmer Commented:
try this
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
       function showDiv() {
                var x = document.getElementById('industrycategory').value;
                  if (x=='Employer/Private/Transportation' || x=='Employer/Private/Construction' || x=='Employer/Private/Manufacturing' || x=='Employer/Private/Service'){
                                document.getElementById('detail').style.display='block';
                               
document.getElementById('other').style.display='none';
                        }
else if (x=='Other') {
document.getElementById('other').style.display='block';
document.getElementById('detail').style.display='none';

}
                else {
                        document.getElementById('detail').style.display='none';
                     
document.getElementById('other').style.display='none';
                        }
               
                }
 
 
</script>
</head>
 
<body>
<TABLE cellSpacing=0 cellPadding=0 border=0>
        <TBODY>
        <TR>
          <TD>
            <DIV class=left_block><A

            onclick="view_picure ('http://www.caf-fca.org/en/ii/employerparticipation.jpg', 465, 599, 'view_picure'); return false"

            href="http://www.caf-fca.org/files/access/Return_On_Training_Investment-Employers_report.pdf"><IMG

            title="Strategies to increase employer participation in apprenticeship training in Canada" alt="Strategies to increase employer participation in apprenticeship training in Canada"

            src="../ii/employer_participation.jpg"></A> </DIV></TD>
          <TD>
         
           <form style="100%" name="YourFormName" method="Post" action="cf_employer_participation.asp" onSubmit="return checkForm(this);">
            <DIV class=right_block>
            <DIV class=highligts><font color="red"><b>*</b></font> denotes required field</DIV>            
           <DIV class=item><SPAN class=title><b><font color="red"><b> * </b></font>Industry category : </SPAN>
            <SELECT name="industrycategory" class=f-textName id="industrycategory" onchange="showDiv ();">
        <OPTION value="" selected class=f-textName>Select One</OPTION>
        <OPTION value="Apprentices" class=f-textName>Apprentices</OPTION>
        <OPTION value="Business / Employer Associations" class=f-textName>Business / Employer Associations</OPTION>
        <OPTION value="Educators High School" class=f-textName>Educators High School</OPTION>
        <OPTION value="Educators Post-Secondary" class=f-textName>Educators Post-Secondary</OPTION>
            <OPTION value="Employees / Journeypersons" class=f-textName>Employees/Journeypersons</OPTION>
            <OPTION value="Employer/Private/Construction" class=f-textName>Employer/Private/Construction</OPTION>
            <OPTION value="Employer/Private/Manufacturing" class=f-textName>Employer/Private/Manufacturing</OPTION>
            <OPTION value="Employer/Private/Service" class=f-textName>Employer/Private/Service</OPTION>
        <OPTION value="Employer/Private/Transportation" class=f-textName>Employer/Private/Transportation</OPTION>
        <OPTION value="Employer Public Sector" class=f-textName>Employer Public Sector</OPTION>            
        <OPTION value="Governments" class=f-textName>Governments</OPTION>
        <OPTION value="Labour" class=f-textName>Labour</OPTION>            
        <OPTION value="NGOs" class=f-textName>NGOs</OPTION>
        <OPTION value="Unions" class=f-textName>Unions</OPTION>
        <OPTION value="Parents" class=f-textName>Parents</OPTION>
        <OPTION value="Research Organizations" class=f-textName>Research Organizations</OPTION>
        <OPTION value="Sector Councils" class=f-textName>Sector Councils</OPTION>
        <OPTION value="Students" class=f-textName>Students</OPTION>
        <OPTION value="Other" class=f-textName>Other</OPTION></SELECT></DIV>
            <DIV class=item style="display:none;" id="detail">
            <SPAN class=title><b>&nbsp;&nbsp;&mdash; Do you hire apprentices at the present time :</b></SPAN>
           <INPUT class="button2" tabIndex=30 type=radio value="1" name=specialreq> Yes
            <INPUT class="button2"  tabIndex=30 type=radio value="0" name=specialreq> No
            
            
            </div>
     <br>
        if the user select OTHER this field should show please
        <DIV class=item id="other" style="display:none;"><SPAN class=title><b><font color="red"><b> * </b></font>Other Industry category : </SPAN>
        <input  name="otherIndustryCategory" type="text" id="otherIndustryCategory"
size="40"></span></div>
        
        <DIV class="item last" id="itemlast"><SPAN class=title><b><font color="red"><b> * </b></font>Province/Territory :</SPAN>
        <SELECT name="txtprovince" class=f-textName>
        <OPTION value="" selected>Select One</OPTION>
        <OPTION value=AB class=f-textName>Alberta</OPTION>
        <OPTION value=BC class=f-textName>British Columbia</OPTION>
        <OPTION value=MB class=f-textName>Manitoba</OPTION>
        <OPTION value=NB class=f-textName>New Brunswick</OPTION>
        <OPTION value=NF class=f-textName>Newfoundland and Labrador</OPTION>
        <OPTION value=NT class=f-textName>Northwest Territories</OPTION>
        <OPTION value=NS class=f-textName>Nova Scotia</OPTION>
        <OPTION value=NU>Nunavut</OPTION>
        <OPTION value=ON class=f-textName>Ontario</OPTION>
        <OPTION value=PE>Prince Eard Island</OPTION>
        <OPTION value=QC class=f-textName>Qubec</OPTION>
        <OPTION value=SK class=f-textName>Saskatchewan</OPTION>
        <OPTION value=YK>Yukon Territory</OPTION>
        <OPTION value=Other class=f-textName>Other</OPTION></SELECT></DIV>    
       <div align="center"><INPUT class=butt title="Send" type="submit" alt="Send" src="" value="Send">
      <INPUT class=butt title="Reset" type="reset" alt="reset" src="" value="Reset">
     
       <INPUT type=hidden

      value=cmVxVzdGZvcnF1b3RlX2Zvcm1fbmFtZSxyZXF1ZXN0Zm9ycXVvdGVfZm9ybV9tZXNzYWdlLHJlcXVlc3Rmb3Jx90ZV9mb3JtX2VtYWlsLHJlcXVlc3Rmb3Jx90ZV9mb3JtX3Bob25lLHJlcXVlc3Rmb3Jx90ZV9mb3JtX2NvbXBhbnkscmVxVzdGZvcnF1b3RlX2Zvcm1fZmlsZSxyZXF1ZXN0Zm9ycXVvdGVfZm9ybV9hZGRpbmZv

      name=_it_fs></FORM></div>
      </em></DIV></DIV></TD></TR></TBODY></TABLE></DIV></DIV>
      <DIV style="PADDING-BOTTOM: 5px">The reports/documents listed on this page reflect the opinion of the individual authors and do not necessarily reflect the opinions of the Canadian Apprenticeship Forum  Forum canadien sur lapprentissage (CAF-FCA).</DIV>
      </DIV><BR><BR>
<BR><BR><BR></DIV></DIV>
</body>
</html>
0
 
erikTsomikSystem Architect, CF programmer Commented:
try this . All i did is added a little JS block  to make it work
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
	function showDiv() {
		var x = document.getElementById('industrycategory').value;
		if (x=='Employer/Private/Transportation'){
				document.getElementById('detail').style.display='block';
			}
		else {
			document.getElementById('detail').style.display='none';
			}
		
		}
 
 
</script>
</head>
 
<body>
<table><tbody><tr><td>
<form style="100%" name="YourFormName" method="Post" action="cf_employer_participation.asp" onSubmit="return checkForm(this);">
            <DIV class=right_block>
            <DIV class=highligts><font color="red"><b>*</b></font> denotes required field</DIV>            
           <DIV class=item><SPAN class=title><b><font color="red"><b> * </b></font><font color="#FF0000">Industry category : a field should show if Employer/Private/Transport was selected how like the random below</font></SPAN>
                <SELECT name="industrycategory" class=f-textName id="industrycategory" onchange="showDiv ();">
        <OPTION value="" selected class=f-textName>Select One</OPTION>
        <OPTION value="Employer/Private/Construction" class=f-textName>Employer/Private/Construction</OPTION>
        <OPTION value="Employer/Private/Manufacturing" class=f-textName>Employer/Private/Manufacturing</OPTION>
        <OPTION value="Employer/Private/Service" class=f-textName>Employer/Private/Service</OPTION>
        <OPTION value="Employer/Private/Transportation" class=f-textName>Employer/Private/Transportation</OPTION>
        <OPTION value="Employer Public Sector" class=f-textName>Employer Public Sector</OPTION>
        <OPTION value="Educators High School" class=f-textName>Educators High School</OPTION>       
        <OPTION value="Other" class=f-textName>Other</OPTION></SELECT></DIV>
				
                   <DIV class=item><SPAN class=title><b><font color="red"><b> * </b></font>Other Industry category : </SPAN><input  name="othertxt" type="text" id="othertxt" size="40"></DIV>
									 <div id="detail" style="display:none;">
									 	 <INPUT class="button2" onclick="document.getElementById('specialyes').style.display=''" 
                              tabIndex=30 type=radio 
                              value="1" name=specialreq>
     Yes <INPUT class="button2" 
                              onclick="document.getElementById('specialyes').style.display='none'" 
                              tabIndex=30 type=radio 
                              value="0" name=specialreq>
     No <SPAN id=specialyes style="DISPLAY: none"><br>
                              <SPAN class=description_text><B>Please specify:</b></span>
                                    <input  name="othertxt" type="text" id="othertxt" size="40">
																		</span>
									 
									 
									 
									 
									 
									 
									 
									 </div>
        <DIV class=item><SPAN class=title><b><font color="red"><b> * </b></font>Province/Territory :</SPAN> 
        <SELECT name="txtprovince" class=f-textName>
        <OPTION value="" selected>Select One</OPTION>
        <OPTION value=AB class=f-textName>Alberta</OPTION>
        <OPTION value=BC class=f-textName>British Columbia</OPTION>
        <OPTION value=MB class=f-textName>Manitoba</OPTION>
        <OPTION value=NB class=f-textName>New Brunswick</OPTION>
        <OPTION value=NF class=f-textName>Newfoundland and Labrador</OPTION>
        <OPTION value=NT class=f-textName>Northwest Territories</OPTION>
        <OPTION value=NS class=f-textName>Nova Scotia</OPTION>
        <OPTION value=NU>Nunavut</OPTION>
        <OPTION value=ON class=f-textName>Ontario</OPTION>
        <OPTION value=PE>Prince Eard Island</OPTION>
        <OPTION value=QC class=f-textName>Québec</OPTION>
        <OPTION value=SK class=f-textName>Saskatchewan</OPTION>
        <OPTION value=YK>Yukon Territory</OPTION>
        <OPTION value=Other class=f-textName>Other</OPTION></SELECT></DIV>
      <DIV class="item last"><SPAN class=title><b><font color="red"><b> * </b></font>Purpose</b><font size="-2"><br>(Please briefly outline your outreach efforts for our office to track the distribution of this material)</font></font></SPAN><br><textarea name="purpose" rows="4" cols="35"></textarea></DIV>            
       <div align="center"><INPUT class=butt title="Send" type="submit" alt="Send" src="" value="Send">
      <INPUT class=butt title="Reset" type="reset" alt="reset" src="" value="Reset">
      
       <INPUT type="hidden" 
      value="cmVxVzdGZvcnF1b3RlX2Zvcm1fbmFtZSxyZXF1ZXN0Zm9ycXVvdGVfZm9ybV9tZXNzYWdlLHJlcXVlc3Rmb3Jx90ZV9mb3JtX2VtYWlsLHJlcXVlc3Rmb3Jx90ZV9mb3JtX3Bob25lLHJlcXVlc3Rmb3Jx90ZV9mb3JtX2NvbXBhbnkscmVxVzdGZvcnF1b3RlX2Zvcm1fZmlsZSxyZXF1ZXN0Zm9ycXVvdGVfZm9ybV9hZGRpbmZv"
      name="_it_fs"></FORM></div>
      </em></DIV></DIV></TD></TR>
          <TR>
    <TD colSpan=2>
 
</body>
</html>

Open in new window

0
 
elieazziAuthor Commented:
Hi there to understant more my question i've modified the url please review it.

http://www.caf-fca.org/en/reports/test.asp 

i'm waiting your response.

Thahnk you for your time I appreciate !!
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
elieazziAuthor Commented:
I see what u did let me try to put on the script brb in 15 minutes. thank you.
0
 
erikTsomikSystem Architect, CF programmer Commented:
try this


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
        function showDiv() {
                var x = document.getElementById('industrycategory').value;
                if (x=='Employer/Private/Transportation' || x=='Employer/Private/Construction' || x=='Employer/Private/Manufacturing' || x=='Employer/Private/Service' ){
                                document.getElementById('detail').style.display='block';
																document.getElementById('item2').style.display='block';
																
																document.getElementById('itemlast').style.display='block';
                        }
                else {
                        document.getElementById('detail').style.display='none';
												document.getElementById('item2').style.display='none';
													document.getElementById('itemlast').style.display='none';
                        }
                
                }
 
 
</script>
</head>
 
<body>
<table><tbody><tr><td>
<form style="100%" name="YourFormName" method="Post" action="cf_employer_participation.asp" onSubmit="return checkForm(this);">
            <DIV class=right_block>
            <DIV class=highligts><font color="red"><b>*</b></font> denotes required field</DIV>            
           <DIV class=item><SPAN class=title><b><font color="red"><b> * </b></font><font color="#FF0000">Industry category : a field should show if Employer/Private/Transport was selected how like the random below</font></SPAN>
                <SELECT name="industrycategory" class=f-textName id="industrycategory" onchange="showDiv ();">
        <OPTION value="" selected class=f-textName>Select One</OPTION>
        <OPTION value="Employer/Private/Construction" class=f-textName>Employer/Private/Construction</OPTION>
        <OPTION value="Employer/Private/Manufacturing" class=f-textName>Employer/Private/Manufacturing</OPTION>
        <OPTION value="Employer/Private/Service" class=f-textName>Employer/Private/Service</OPTION>
        <OPTION value="Employer/Private/Transportation" class=f-textName>Employer/Private/Transportation</OPTION>
        <OPTION value="Employer Public Sector" class=f-textName>Employer Public Sector</OPTION>
        <OPTION value="Educators High School" class=f-textName>Educators High School</OPTION>       
        <OPTION value="Other" class=f-textName>Other</OPTION></SELECT></DIV>
                                
                   <DIV class=item id="item" style="display:none"><SPAN class=title><b><font color="red"><b> * </b></font>Other Industry category : </SPAN><input  name="othertxt" type="text" id="othertxt" size="40"></DIV>
                                                                         <div id="detail" style="display:none;">
                                                                                 <INPUT class="button2" onclick="document.getElementById('specialyes').style.display=''" 
                              tabIndex=30 type=radio 
                              value="1" name=specialreq>
     Yes <INPUT class="button2" 
                              onclick="document.getElementById('specialyes').style.display='none'" 
                              tabIndex=30 type=radio 
                              value="0" name=specialreq>
     No <SPAN id=specialyes style="DISPLAY: none"><br>
                              <SPAN class=description_text><B>Please specify:</b></span>
                               
																		<textarea name="othertxt" id="othertxt" cols="80" rows="5"></textarea>
                                                                                                                                                </span>
                                                                         
                                                                         
                                                                         
                                                                         
                                                                         
                                                                         
                                                                         
                                                                         </div>
        <DIV id="item2" style="display:none;" class=item><SPAN class=title><b><font color="red"><b> * </b></font>Province/Territory :</SPAN> 
        <SELECT name="txtprovince" class=f-textName>
        <OPTION value="" selected>Select One</OPTION>
        <OPTION value=AB class=f-textName>Alberta</OPTION>
        <OPTION value=BC class=f-textName>British Columbia</OPTION>
        <OPTION value=MB class=f-textName>Manitoba</OPTION>
        <OPTION value=NB class=f-textName>New Brunswick</OPTION>
        <OPTION value=NF class=f-textName>Newfoundland and Labrador</OPTION>
        <OPTION value=NT class=f-textName>Northwest Territories</OPTION>
        <OPTION value=NS class=f-textName>Nova Scotia</OPTION>
        <OPTION value=NU>Nunavut</OPTION>
        <OPTION value=ON class=f-textName>Ontario</OPTION>
        <OPTION value=PE>Prince Eard Island</OPTION>
        <OPTION value=QC class=f-textName>Québec</OPTION>
        <OPTION value=SK class=f-textName>Saskatchewan</OPTION>
        <OPTION value=YK>Yukon Territory</OPTION>
        <OPTION value=Other class=f-textName>Other</OPTION></SELECT></DIV>
      <DIV id="itemlast" style="display:none" class="item last"><SPAN class=title><b><font color="red"><b> * </b></font>Purpose</b><font size="-2"><br>(Please briefly outline your outreach efforts for our office to track the distribution of this material)</font></font></SPAN><br><textarea name="purpose" rows="4" cols="35"></textarea></DIV>            
       <div align="center"><INPUT class=butt title="Send" type="submit" alt="Send" src="" value="Send">
      <INPUT class=butt title="Reset" type="reset" alt="reset" src="" value="Reset">
      
       <INPUT type="hidden" 
      value="cmVxVzdGZvcnF1b3RlX2Zvcm1fbmFtZSxyZXF1ZXN0Zm9ycXVvdGVfZm9ybV9tZXNzYWdlLHJlcXVlc3Rmb3Jx90ZV9mb3JtX2VtYWlsLHJlcXVlc3Rmb3Jx90ZV9mb3JtX3Bob25lLHJlcXVlc3Rmb3Jx90ZV9mb3JtX2NvbXBhbnkscmVxVzdGZvcnF1b3RlX2Zvcm1fZmlsZSxyZXF1ZXN0Zm9ycXVvdGVfZm9ybV9hZGRpbmZv"
      name="_it_fs"></FORM></div>
      </em></DIV></DIV></TD></TR>
          <TR>
    <TD colSpan=2>
 
</body>
</html>

Open in new window

0
 
elieazziAuthor Commented:
It's coming you're a super expert :) http://www.caf-fca.org/en/reports/test.asp

So, I need this change to be done if the user select those 5 employers options.  how i can implement this on the JavaScript pls advice.

Employer/Private/Construction
Employer/Private/Manufacturing
Employer/Private/Service
Employer/Private/Transportation
Employer Public Sector

and if the user select OTHER
an id text will show

http://www.caf-fca.org/en/reports/test.asp 

<script type="text/javascript">
      function showDiv() {
            var x = document.getElementById('industrycategory').value;
            if (x=='Employer/Private/Transportation'){
                        document.getElementById('detail').style.display='block';
                  }
            else {
                  document.getElementById('detail').style.display='none';
                  }
            
            }
 
 
</script>

I've attached the code. thank you for your help.

<script type="text/javascript">
	function showDiv() {
		var x = document.getElementById('industrycategory').value;
		if (x=='Employer/Private/Transportation'){
				document.getElementById('detail').style.display='block';
			}
		else {
			document.getElementById('detail').style.display='none';
			}
		
		}
 
 
</script>
 
<TABLE cellSpacing=0 cellPadding=0 border=0>
        <TBODY>
        <TR>
          <TD>
            <DIV class=left_block><A 
            onclick="view_picure ('http://www.caf-fca.org/en/ii/employerparticipation.jpg', 465, 599, 'view_picure'); return false" 
            href="http://www.caf-fca.org/files/access/Return_On_Training_Investment-Employers_report.pdf"><IMG 
            title="Strategies to increase employer participation in apprenticeship training in Canada" alt="Strategies to increase employer participation in apprenticeship training in Canada" 
            src="../ii/employer_participation.jpg"></A> </DIV></TD>
          <TD>
          
           <form style="100%" name="YourFormName" method="Post" action="cf_employer_participation.asp" onSubmit="return checkForm(this);">
            <DIV class=right_block>
            <DIV class=highligts><font color="red"><b>*</b></font> denotes required field</DIV>            
           <DIV class=item><SPAN class=title><b><font color="red"><b> * </b></font>Industry category : </SPAN>
            <SELECT name="industrycategory" class=f-textName id="industrycategory" onchange="showDiv ();">
        <OPTION value="" selected class=f-textName>Select One</OPTION>
        <OPTION value="Apprentices" class=f-textName>Apprentices</OPTION>
        <OPTION value="Business / Employer Associations" class=f-textName>Business / Employer Associations</OPTION>
        <OPTION value="Educators High School" class=f-textName>Educators High School</OPTION>
        <OPTION value="Educators Post-Secondary" class=f-textName>Educators Post-Secondary</OPTION>
		<OPTION value="Employees / Journeypersons" class=f-textName>Employees/Journeypersons</OPTION>
		<OPTION value="Employer/Private/Construction" class=f-textName>Employer/Private/Construction</OPTION>
		<OPTION value="Employer/Private/Manufacturing" class=f-textName>Employer/Private/Manufacturing</OPTION>
		<OPTION value="Employer/Private/Service" class=f-textName>Employer/Private/Service</OPTION>
        <OPTION value="Employer/Private/Transportation" class=f-textName>Employer/Private/Transportation</OPTION>
        <OPTION value="Employer Public Sector" class=f-textName>Employer Public Sector</OPTION>		
        <OPTION value="Governments" class=f-textName>Governments</OPTION>
        <OPTION value="Labour" class=f-textName>Labour</OPTION>		
        <OPTION value="NGOs" class=f-textName>NGOs</OPTION>
        <OPTION value="Unions" class=f-textName>Unions</OPTION>
        <OPTION value="Parents" class=f-textName>Parents</OPTION>
        <OPTION value="Research Organizations" class=f-textName>Research Organizations</OPTION>
        <OPTION value="Sector Councils" class=f-textName>Sector Councils</OPTION>
        <OPTION value="Students" class=f-textName>Students</OPTION>
        <OPTION value="Other" class=f-textName>Other</OPTION></SELECT></DIV>
		<DIV class=item style="display:none;" id="detail">
		<SPAN class=title><b>&nbsp;&nbsp;&mdash; Do you hire apprentices at the present time :</b></SPAN>
 	    <INPUT class="button2" onclick="document.getElementById('specialyes').style.display=''" tabIndex=30 type=radio value="1" name=specialreq> Yes 
		<INPUT class="button2" onclick="document.getElementById('specialyes').style.display='none'" tabIndex=30 type=radio value="0" name=specialreq> No 
		<SPAN id=specialyes style="DISPLAY: none"><br>
        <SPAN class=item><B>Please specify:</b></span>
		<input  name="othertxt" type="text" id="othertxt" size="40"></span></div>
     <br>
	  if the user select OTHER this field should show please 
	  <DIV class=item><SPAN class=title><b><font color="red"><b> * </b></font>Other Industry category : </SPAN>
	  <input  name="otherIndustryCategory" type="text" id="otherIndustryCategory" size="40"></span></div>
	  
        <DIV class="item last"><SPAN class=title><b><font color="red"><b> * </b></font>Province/Territory :</SPAN> 
        <SELECT name="txtprovince" class=f-textName>
        <OPTION value="" selected>Select One</OPTION>
        <OPTION value=AB class=f-textName>Alberta</OPTION>
        <OPTION value=BC class=f-textName>British Columbia</OPTION>
        <OPTION value=MB class=f-textName>Manitoba</OPTION>
        <OPTION value=NB class=f-textName>New Brunswick</OPTION>
        <OPTION value=NF class=f-textName>Newfoundland and Labrador</OPTION>
        <OPTION value=NT class=f-textName>Northwest Territories</OPTION>
        <OPTION value=NS class=f-textName>Nova Scotia</OPTION>
        <OPTION value=NU>Nunavut</OPTION>
        <OPTION value=ON class=f-textName>Ontario</OPTION>
        <OPTION value=PE>Prince Eard Island</OPTION>
        <OPTION value=QC class=f-textName>Québec</OPTION>
        <OPTION value=SK class=f-textName>Saskatchewan</OPTION>
        <OPTION value=YK>Yukon Territory</OPTION>
        <OPTION value=Other class=f-textName>Other</OPTION></SELECT></DIV>     
       <div align="center"><INPUT class=butt title="Send" type="submit" alt="Send" src="" value="Send">
      <INPUT class=butt title="Reset" type="reset" alt="reset" src="" value="Reset">
      
       <INPUT type=hidden 
      value=cmVxVzdGZvcnF1b3RlX2Zvcm1fbmFtZSxyZXF1ZXN0Zm9ycXVvdGVfZm9ybV9tZXNzYWdlLHJlcXVlc3Rmb3Jx90ZV9mb3JtX2VtYWlsLHJlcXVlc3Rmb3Jx90ZV9mb3JtX3Bob25lLHJlcXVlc3Rmb3Jx90ZV9mb3JtX2NvbXBhbnkscmVxVzdGZvcnF1b3RlX2Zvcm1fZmlsZSxyZXF1ZXN0Zm9ycXVvdGVfZm9ybV9hZGRpbmZv 
      name=_it_fs></FORM></div>
      </em></DIV></DIV></TD></TR></TBODY></TABLE></DIV></DIV>
      <DIV style="PADDING-BOTTOM: 5px">The reports/documents listed on this page reflect the opinion of the individual authors and do not necessarily reflect the opinions of the Canadian Apprenticeship Forum  Forum canadien sur lapprentissage (CAF-FCA).</DIV>
      </DIV><BR><BR>
<BR><BR><BR></DIV></DIV>

Open in new window

0
 
erikTsomikSystem Architect, CF programmer Commented:
try this
  function showDiv() {
                var x = document.getElementById('industrycategory').value;
                if (x=='Employer/Private/Transportation' || x=='Employer/Private/Construction' || x=='Employer/Private/Manufacturing' || x=='Employer/Private/Service' ){
                                document.getElementById('detail').style.display='block';
                                                                                                document.getElementById('item2').style.display='block';
                                                                                                
                                                                                                document.getElementById('itemlast').style.display='block';
                        }
                else {
                        document.getElementById('detail').style.display='none';
                                                                        document.getElementById('item2').style.display='none';
                                                                              document.getElementById('itemlast').style.display='none';
                        }
               
                }
 
0
 
erikTsomikSystem Architect, CF programmer Commented:
also i would have as a value of the drop down numeric values.

<option value="1">Transportation</option>
0
 
Michel PlungjanIT ExpertCommented:
Use .text instead of .value or change to use the numbers
0
 
elieazziAuthor Commented:
Hello Erik,

Would you please advice it give me error the script file.

http://www.caf-fca.org/en/reports/test.asp 
0
 
erikTsomikSystem Architect, CF programmer Commented:
it is looking for id="item2" if you do not use it in you code please remove from the JAvacsript as well
0
 
elieazziAuthor Commented:
I removed... I will copy the code for u to see.
0
 
elieazziAuthor Commented:
http://www.caf-fca.org/en/reports/test.asp
<script type="text/javascript">
	 function showDiv() {
                var x = document.getElementById('industrycategory').value;
                if (x=='Employer/Private/Transportation' || x=='Employer/Private/Construction' || x=='Employer/Private/Manufacturing' || x=='Employer/Private/Service' ){
                                document.getElementById('detail').style.display='block';
                                                                                                document.getElementById('itemlast').style.display='block';
                        }
                else {
                        document.getElementById('detail').style.display='none';
                                                                              document.getElementById('itemlast').style.display='none';
                        }
                
                }
 
 
</script>
 
<TABLE cellSpacing=0 cellPadding=0 border=0>
        <TBODY>
        <TR>
          <TD>
            <DIV class=left_block><A 
            onclick="view_picure ('http://www.caf-fca.org/en/ii/employerparticipation.jpg', 465, 599, 'view_picure'); return false" 
            href="http://www.caf-fca.org/files/access/Return_On_Training_Investment-Employers_report.pdf"><IMG 
            title="Strategies to increase employer participation in apprenticeship training in Canada" alt="Strategies to increase employer participation in apprenticeship training in Canada" 
            src="../ii/employer_participation.jpg"></A> </DIV></TD>
          <TD>
          
           <form style="100%" name="YourFormName" method="Post" action="cf_employer_participation.asp" onSubmit="return checkForm(this);">
            <DIV class=right_block>
            <DIV class=highligts><font color="red"><b>*</b></font> denotes required field</DIV>            
           <DIV class=item><SPAN class=title><b><font color="red"><b> * </b></font>Industry category : </SPAN>
            <SELECT name="industrycategory" class=f-textName id="industrycategory" onchange="showDiv ();">
        <OPTION value="" selected class=f-textName>Select One</OPTION>
        <OPTION value="Apprentices" class=f-textName>Apprentices</OPTION>
        <OPTION value="Business / Employer Associations" class=f-textName>Business / Employer Associations</OPTION>
        <OPTION value="Educators High School" class=f-textName>Educators High School</OPTION>
        <OPTION value="Educators Post-Secondary" class=f-textName>Educators Post-Secondary</OPTION>
		<OPTION value="Employees / Journeypersons" class=f-textName>Employees/Journeypersons</OPTION>
		<OPTION value="Employer/Private/Construction" class=f-textName>Employer/Private/Construction</OPTION>
		<OPTION value="Employer/Private/Manufacturing" class=f-textName>Employer/Private/Manufacturing</OPTION>
		<OPTION value="Employer/Private/Service" class=f-textName>Employer/Private/Service</OPTION>
        <OPTION value="Employer/Private/Transportation" class=f-textName>Employer/Private/Transportation</OPTION>
        <OPTION value="Employer Public Sector" class=f-textName>Employer Public Sector</OPTION>		
        <OPTION value="Governments" class=f-textName>Governments</OPTION>
        <OPTION value="Labour" class=f-textName>Labour</OPTION>		
        <OPTION value="NGOs" class=f-textName>NGOs</OPTION>
        <OPTION value="Unions" class=f-textName>Unions</OPTION>
        <OPTION value="Parents" class=f-textName>Parents</OPTION>
        <OPTION value="Research Organizations" class=f-textName>Research Organizations</OPTION>
        <OPTION value="Sector Councils" class=f-textName>Sector Councils</OPTION>
        <OPTION value="Students" class=f-textName>Students</OPTION>
        <OPTION value="Other" class=f-textName>Other</OPTION></SELECT></DIV>
		<DIV class=item style="display:none;" id="detail">
		<SPAN class=title><b>&nbsp;&nbsp;&mdash; Do you hire apprentices at the present time :</b></SPAN>
 	    <INPUT class="button2" onclick="document.getElementById('specialyes').style.display=''" tabIndex=30 type=radio value="1" name=specialreq> Yes 
		<INPUT class="button2" onclick="document.getElementById('specialyes').style.display='none'" tabIndex=30 type=radio value="0" name=specialreq> No 
		<SPAN id=specialyes style="DISPLAY: none"><br>
        <SPAN class=item><B>Please specify:</b></span>
		<input  name="othertxt" type="text" id="othertxt" size="40"></span></div>
     <br>
	  if the user select OTHER this field should show please 
	  <DIV class=item><SPAN class=title><b><font color="red"><b> * </b></font>Other Industry category : </SPAN>
	  <input  name="otherIndustryCategory" type="text" id="otherIndustryCategory" size="40"></span></div>
	  
        <DIV class="item last"><SPAN class=title><b><font color="red"><b> * </b></font>Province/Territory :</SPAN> 
        <SELECT name="txtprovince" class=f-textName>
        <OPTION value="" selected>Select One</OPTION>
        <OPTION value=AB class=f-textName>Alberta</OPTION>
        <OPTION value=BC class=f-textName>British Columbia</OPTION>
        <OPTION value=MB class=f-textName>Manitoba</OPTION>
        <OPTION value=NB class=f-textName>New Brunswick</OPTION>
        <OPTION value=NF class=f-textName>Newfoundland and Labrador</OPTION>
        <OPTION value=NT class=f-textName>Northwest Territories</OPTION>
        <OPTION value=NS class=f-textName>Nova Scotia</OPTION>
        <OPTION value=NU>Nunavut</OPTION>
        <OPTION value=ON class=f-textName>Ontario</OPTION>
        <OPTION value=PE>Prince Eard Island</OPTION>
        <OPTION value=QC class=f-textName>Québec</OPTION>
        <OPTION value=SK class=f-textName>Saskatchewan</OPTION>
        <OPTION value=YK>Yukon Territory</OPTION>
        <OPTION value=Other class=f-textName>Other</OPTION></SELECT></DIV>     
       <div align="center"><INPUT class=butt title="Send" type="submit" alt="Send" src="" value="Send">
      <INPUT class=butt title="Reset" type="reset" alt="reset" src="" value="Reset">
      
       <INPUT type=hidden 
      value=cmVxVzdGZvcnF1b3RlX2Zvcm1fbmFtZSxyZXF1ZXN0Zm9ycXVvdGVfZm9ybV9tZXNzYWdlLHJlcXVlc3Rmb3Jx90ZV9mb3JtX2VtYWlsLHJlcXVlc3Rmb3Jx90ZV9mb3JtX3Bob25lLHJlcXVlc3Rmb3Jx90ZV9mb3JtX2NvbXBhbnkscmVxVzdGZvcnF1b3RlX2Zvcm1fZmlsZSxyZXF1ZXN0Zm9ycXVvdGVfZm9ybV9hZGRpbmZv 
      name=_it_fs></FORM></div>
      </em></DIV></DIV></TD></TR></TBODY></TABLE></DIV></DIV>
      <DIV style="PADDING-BOTTOM: 5px">The reports/documents listed on this page reflect the opinion of the individual authors and do not necessarily reflect the opinions of the Canadian Apprenticeship Forum  Forum canadien sur lapprentissage (CAF-FCA).</DIV>
      </DIV><BR><BR>
<BR><BR><BR></DIV></DIV>

Open in new window

0
 
erikTsomikSystem Architect, CF programmer Commented:
you missed itemlast id
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
	 function showDiv() {
                var x = document.getElementById('industrycategory').value;
                if (x=='Employer/Private/Transportation' || x=='Employer/Private/Construction' || x=='Employer/Private/Manufacturing' || x=='Employer/Private/Service' ){
                                document.getElementById('detail').style.display='block';
                                document.getElementById('itemlast').style.display='block';
                        }
                else {
                        document.getElementById('detail').style.display='none';
                       document.getElementById('itemlast').style.display='none';
                        }
                
                }
 
 
</script>
</head>
 
<body>
<TABLE cellSpacing=0 cellPadding=0 border=0>
        <TBODY>
        <TR>
          <TD>
            <DIV class=left_block><A 
            onclick="view_picure ('http://www.caf-fca.org/en/ii/employerparticipation.jpg', 465, 599, 'view_picure'); return false" 
            href="http://www.caf-fca.org/files/access/Return_On_Training_Investment-Employers_report.pdf"><IMG 
            title="Strategies to increase employer participation in apprenticeship training in Canada" alt="Strategies to increase employer participation in apprenticeship training in Canada" 
            src="../ii/employer_participation.jpg"></A> </DIV></TD>
          <TD>
          
           <form style="100%" name="YourFormName" method="Post" action="cf_employer_participation.asp" onSubmit="return checkForm(this);">
            <DIV class=right_block>
            <DIV class=highligts><font color="red"><b>*</b></font> denotes required field</DIV>            
           <DIV class=item><SPAN class=title><b><font color="red"><b> * </b></font>Industry category : </SPAN>
            <SELECT name="industrycategory" class=f-textName id="industrycategory" onchange="showDiv ();">
        <OPTION value="" selected class=f-textName>Select One</OPTION>
        <OPTION value="Apprentices" class=f-textName>Apprentices</OPTION>
        <OPTION value="Business / Employer Associations" class=f-textName>Business / Employer Associations</OPTION>
        <OPTION value="Educators High School" class=f-textName>Educators High School</OPTION>
        <OPTION value="Educators Post-Secondary" class=f-textName>Educators Post-Secondary</OPTION>
		<OPTION value="Employees / Journeypersons" class=f-textName>Employees/Journeypersons</OPTION>
		<OPTION value="Employer/Private/Construction" class=f-textName>Employer/Private/Construction</OPTION>
		<OPTION value="Employer/Private/Manufacturing" class=f-textName>Employer/Private/Manufacturing</OPTION>
		<OPTION value="Employer/Private/Service" class=f-textName>Employer/Private/Service</OPTION>
        <OPTION value="Employer/Private/Transportation" class=f-textName>Employer/Private/Transportation</OPTION>
        <OPTION value="Employer Public Sector" class=f-textName>Employer Public Sector</OPTION>		
        <OPTION value="Governments" class=f-textName>Governments</OPTION>
        <OPTION value="Labour" class=f-textName>Labour</OPTION>		
        <OPTION value="NGOs" class=f-textName>NGOs</OPTION>
        <OPTION value="Unions" class=f-textName>Unions</OPTION>
        <OPTION value="Parents" class=f-textName>Parents</OPTION>
        <OPTION value="Research Organizations" class=f-textName>Research Organizations</OPTION>
        <OPTION value="Sector Councils" class=f-textName>Sector Councils</OPTION>
        <OPTION value="Students" class=f-textName>Students</OPTION>
        <OPTION value="Other" class=f-textName>Other</OPTION></SELECT></DIV>
		<DIV class=item style="display:none;" id="detail">
		<SPAN class=title><b>&nbsp;&nbsp;&mdash; Do you hire apprentices at the present time :</b></SPAN>
 	    <INPUT class="button2" onclick="document.getElementById('specialyes').style.display=''" tabIndex=30 type=radio value="1" name=specialreq> Yes 
		<INPUT class="button2" onclick="document.getElementById('specialyes').style.display='none'" tabIndex=30 type=radio value="0" name=specialreq> No 
		<SPAN id=specialyes style="DISPLAY: none"><br>
        <SPAN class=item><B>Please specify:</b></span>
		<input  name="othertxt" type="text" id="othertxt" size="40"></span></div>
     <br>
	  if the user select OTHER this field should show please 
	  <DIV class=item><SPAN class=title><b><font color="red"><b> * </b></font>Other Industry category : </SPAN>
	  <input  name="otherIndustryCategory" type="text" id="otherIndustryCategory" size="40"></span></div>
	  
        <DIV class="item last" id="itemlast"><SPAN class=title><b><font color="red"><b> * </b></font>Province/Territory :</SPAN> 
        <SELECT name="txtprovince" class=f-textName>
        <OPTION value="" selected>Select One</OPTION>
        <OPTION value=AB class=f-textName>Alberta</OPTION>
        <OPTION value=BC class=f-textName>British Columbia</OPTION>
        <OPTION value=MB class=f-textName>Manitoba</OPTION>
        <OPTION value=NB class=f-textName>New Brunswick</OPTION>
        <OPTION value=NF class=f-textName>Newfoundland and Labrador</OPTION>
        <OPTION value=NT class=f-textName>Northwest Territories</OPTION>
        <OPTION value=NS class=f-textName>Nova Scotia</OPTION>
        <OPTION value=NU>Nunavut</OPTION>
        <OPTION value=ON class=f-textName>Ontario</OPTION>
        <OPTION value=PE>Prince Eard Island</OPTION>
        <OPTION value=QC class=f-textName>Québec</OPTION>
        <OPTION value=SK class=f-textName>Saskatchewan</OPTION>
        <OPTION value=YK>Yukon Territory</OPTION>
        <OPTION value=Other class=f-textName>Other</OPTION></SELECT></DIV>     
       <div align="center"><INPUT class=butt title="Send" type="submit" alt="Send" src="" value="Send">
      <INPUT class=butt title="Reset" type="reset" alt="reset" src="" value="Reset">
      
       <INPUT type=hidden 
      value=cmVxVzdGZvcnF1b3RlX2Zvcm1fbmFtZSxyZXF1ZXN0Zm9ycXVvdGVfZm9ybV9tZXNzYWdlLHJlcXVlc3Rmb3Jx90ZV9mb3JtX2VtYWlsLHJlcXVlc3Rmb3Jx90ZV9mb3JtX3Bob25lLHJlcXVlc3Rmb3Jx90ZV9mb3JtX2NvbXBhbnkscmVxVzdGZvcnF1b3RlX2Zvcm1fZmlsZSxyZXF1ZXN0Zm9ycXVvdGVfZm9ybV9hZGRpbmZv 
      name=_it_fs></FORM></div>
      </em></DIV></DIV></TD></TR></TBODY></TABLE></DIV></DIV>
      <DIV style="PADDING-BOTTOM: 5px">The reports/documents listed on this page reflect the opinion of the individual authors and do not necessarily reflect the opinions of the Canadian Apprenticeship Forum  Forum canadien sur lapprentissage (CAF-FCA).</DIV>
      </DIV><BR><BR>
<BR><BR><BR></DIV></DIV>
</body>
</html>

Open in new window

0
 
elieazziAuthor Commented:
Thank you Erik, one more thing that you forget to correct it the when the user select 'OTHER' the other filed should show .. Right now is always showing and that's it.

thank you for your time.  Waiting for ur update to see how because it didn't work with me the other
0
 
elieazziAuthor Commented:
0
 
erikTsomikSystem Architect, CF programmer Commented:
Just change this line
if (x=='Employer/Private/Transportation' || x=='Employer/Private/Construction' || x=='Employer/Private/Manufacturing' || x=='Employer/Private/Service' ){

to
if (x=='Employer/Private/Transportation' || x=='Employer/Private/Construction' || x=='Employer/Private/Manufacturing' || x=='Employer/Private/Service'  || x=='Other'){
0
 
elieazziAuthor Commented:
Erik,

I don't want when the user select 'OTHER' to show the same as 'Employer/Private/Transportation' || x=='Employer/Private/Construction' || x=='Employer/Private/Manufacturing' || x=='Employer/Private/Service'  

I want when the user select 'OTHER' to show the field this one below :

Other Industry category :
  <input  name="otherIndustryCategory" type="text" id="otherIndustryCategory" size="40">

Thank you;.
0
 
erikTsomikSystem Architect, CF programmer Commented:
i believe that how it works now
0
 
elieazziAuthor Commented:
but I need the

Other Industry category :
  <input  name="otherIndustryCategory" type="text" id="otherIndustryCategory" size="40">

to show only when 'OTHERS' was selectecd in the menu.. so it's easy as u did for the employer/private but different field will show.  pls advice.
0
 
erikTsomikSystem Architect, CF programmer Commented:
what do you see when you select something different then we have specified
0
 
erikTsomikSystem Architect, CF programmer Commented:
do you want to see yes no options ?
What else
0
 
elieazziAuthor Commented:
Hello Erik,

Happy Easter, thank you for all the help u provide it super... one more thing very small is missin and i know u are able to fix it.

When I select something from
                 Industry category :  Other
I DON't Want This MSG TO SHOW
   Do you hire apprentices at the present time :  Yes  No
I want this MSG TO SHOW
   Other Industry category : [                      ]

no more :) So other Industru category [            ] should show only if I select OTHER from industry category above.

Waiting for ur change.
http://www.caf-fca.org/en/reports/test.asp 
Thank you.
0
 
erikTsomikSystem Architect, CF programmer Commented:
try this
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
       function showDiv() {
                var x = document.getElementById('industrycategory').value;
                  if (x=='Employer/Private/Transportation' || x=='Employer/Private/Construction' || x=='Employer/Private/Manufacturing' || x=='Employer/Private/Service'){
                                document.getElementById('detail').style.display='block';
                                document.getElementById('itemlast').style.display='block';
document.getElementById('other').style.display='none';
                        }
else if (x=='Other') {
document.getElementById('other').style.display='block';

}
                else {
                        document.getElementById('detail').style.display='none';
                       document.getElementById('itemlast').style.display='none';
document.getElementById('other').style.display='none';
                        }
               
                }
 
 
</script>
</head>
 
<body>
<TABLE cellSpacing=0 cellPadding=0 border=0>
        <TBODY>
        <TR>
          <TD>
            <DIV class=left_block><A

            onclick="view_picure ('http://www.caf-fca.org/en/ii/employerparticipation.jpg', 465, 599, 'view_picure'); return false"

            href="http://www.caf-fca.org/files/access/Return_On_Training_Investment-Employers_report.pdf"><IMG

            title="Strategies to increase employer participation in apprenticeship training in Canada" alt="Strategies to increase employer participation in apprenticeship training in Canada"

            src="../ii/employer_participation.jpg"></A> </DIV></TD>
          <TD>
         
           <form style="100%" name="YourFormName" method="Post" action="cf_employer_participation.asp" onSubmit="return checkForm(this);">
            <DIV class=right_block>
            <DIV class=highligts><font color="red"><b>*</b></font> denotes required field</DIV>            
           <DIV class=item><SPAN class=title><b><font color="red"><b> * </b></font>Industry category : </SPAN>
            <SELECT name="industrycategory" class=f-textName id="industrycategory" onchange="showDiv ();">
        <OPTION value="" selected class=f-textName>Select One</OPTION>
        <OPTION value="Apprentices" class=f-textName>Apprentices</OPTION>
        <OPTION value="Business / Employer Associations" class=f-textName>Business / Employer Associations</OPTION>
        <OPTION value="Educators High School" class=f-textName>Educators High School</OPTION>
        <OPTION value="Educators Post-Secondary" class=f-textName>Educators Post-Secondary</OPTION>
            <OPTION value="Employees / Journeypersons" class=f-textName>Employees/Journeypersons</OPTION>
            <OPTION value="Employer/Private/Construction" class=f-textName>Employer/Private/Construction</OPTION>
            <OPTION value="Employer/Private/Manufacturing" class=f-textName>Employer/Private/Manufacturing</OPTION>
            <OPTION value="Employer/Private/Service" class=f-textName>Employer/Private/Service</OPTION>
        <OPTION value="Employer/Private/Transportation" class=f-textName>Employer/Private/Transportation</OPTION>
        <OPTION value="Employer Public Sector" class=f-textName>Employer Public Sector</OPTION>            
        <OPTION value="Governments" class=f-textName>Governments</OPTION>
        <OPTION value="Labour" class=f-textName>Labour</OPTION>            
        <OPTION value="NGOs" class=f-textName>NGOs</OPTION>
        <OPTION value="Unions" class=f-textName>Unions</OPTION>
        <OPTION value="Parents" class=f-textName>Parents</OPTION>
        <OPTION value="Research Organizations" class=f-textName>Research Organizations</OPTION>
        <OPTION value="Sector Councils" class=f-textName>Sector Councils</OPTION>
        <OPTION value="Students" class=f-textName>Students</OPTION>
        <OPTION value="Other" class=f-textName>Other</OPTION></SELECT></DIV>
            <DIV class=item style="display:none;" id="detail">
            <SPAN class=title><b>&nbsp;&nbsp;&mdash; Do you hire apprentices at the present time :</b></SPAN>
           <INPUT class="button2" onclick="document.getElementById('specialyes').style.display=''" tabIndex=30 type=radio value="1" name=specialreq> Yes
            <INPUT class="button2" onclick="document.getElementById('specialyes').style.display='none'" tabIndex=30 type=radio value="0" name=specialreq> No
            <SPAN id=specialyes style="DISPLAY: none"><br>
        <SPAN class=item><B>Please specify:</b></span>
            <input  name="othertxt" type="text" id="othertxt" size="40"></span></div>
     <br>
        if the user select OTHER this field should show please
        <DIV class=item id="other" style="display:none;"><SPAN class=title><b><font color="red"><b> * </b></font>Other Industry category : </SPAN>
        <input  name="otherIndustryCategory" type="text" id="otherIndustryCategory"
size="40"></span></div>
        
        <DIV class="item last" id="itemlast"><SPAN class=title><b><font color="red"><b> * </b></font>Province/Territory :</SPAN>
        <SELECT name="txtprovince" class=f-textName>
        <OPTION value="" selected>Select One</OPTION>
        <OPTION value=AB class=f-textName>Alberta</OPTION>
        <OPTION value=BC class=f-textName>British Columbia</OPTION>
        <OPTION value=MB class=f-textName>Manitoba</OPTION>
        <OPTION value=NB class=f-textName>New Brunswick</OPTION>
        <OPTION value=NF class=f-textName>Newfoundland and Labrador</OPTION>
        <OPTION value=NT class=f-textName>Northwest Territories</OPTION>
        <OPTION value=NS class=f-textName>Nova Scotia</OPTION>
        <OPTION value=NU>Nunavut</OPTION>
        <OPTION value=ON class=f-textName>Ontario</OPTION>
        <OPTION value=PE>Prince Eard Island</OPTION>
        <OPTION value=QC class=f-textName>Qubec</OPTION>
        <OPTION value=SK class=f-textName>Saskatchewan</OPTION>
        <OPTION value=YK>Yukon Territory</OPTION>
        <OPTION value=Other class=f-textName>Other</OPTION></SELECT></DIV>    
       <div align="center"><INPUT class=butt title="Send" type="submit" alt="Send" src="" value="Send">
      <INPUT class=butt title="Reset" type="reset" alt="reset" src="" value="Reset">
     
       <INPUT type=hidden

      value=cmVxVzdGZvcnF1b3RlX2Zvcm1fbmFtZSxyZXF1ZXN0Zm9ycXVvdGVfZm9ybV9tZXNzYWdlLHJlcXVlc3Rmb3Jx90ZV9mb3JtX2VtYWlsLHJlcXVlc3Rmb3Jx90ZV9mb3JtX3Bob25lLHJlcXVlc3Rmb3Jx90ZV9mb3JtX2NvbXBhbnkscmVxVzdGZvcnF1b3RlX2Zvcm1fZmlsZSxyZXF1ZXN0Zm9ycXVvdGVfZm9ybV9hZGRpbmZv

      name=_it_fs></FORM></div>
      </em></DIV></DIV></TD></TR></TBODY></TABLE></DIV></DIV>
      <DIV style="PADDING-BOTTOM: 5px">The reports/documents listed on this page reflect the opinion of the individual authors and do not necessarily reflect the opinions of the Canadian Apprenticeship Forum  Forum canadien sur lapprentissage (CAF-FCA).</DIV>
      </DIV><BR><BR>
<BR><BR><BR></DIV></DIV>
</body>
</html>
0
 
elieazziAuthor Commented:
Hi Erick,

A friendly reminder the
            * Province/Territory :  ^^             ^^^

Should appear always.  

Right now if u select Apprentice it will not show would you please fix the code.

Thank you for your time.
0
 
erikTsomikSystem Architect, CF programmer Commented:
ok. Check this out now
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
       function showDiv() {
                var x = document.getElementById('industrycategory').value;
                  if (x=='Employer/Private/Transportation' || x=='Employer/Private/Construction' || x=='Employer/Private/Manufacturing' || x=='Employer/Private/Service'){
                                document.getElementById('detail').style.display='block';
                               
document.getElementById('other').style.display='none';
                        }
else if (x=='Other') {
document.getElementById('other').style.display='block';

}
                else {
                        document.getElementById('detail').style.display='none';
                     
document.getElementById('other').style.display='none';
                        }
               
                }
 
 
</script>
</head>
 
<body>
<TABLE cellSpacing=0 cellPadding=0 border=0>
        <TBODY>
        <TR>
          <TD>
            <DIV class=left_block><A

            onclick="view_picure ('http://www.caf-fca.org/en/ii/employerparticipation.jpg', 465, 599, 'view_picure'); return false"

            href="http://www.caf-fca.org/files/access/Return_On_Training_Investment-Employers_report.pdf"><IMG

            title="Strategies to increase employer participation in apprenticeship training in Canada" alt="Strategies to increase employer participation in apprenticeship training in Canada"

            src="../ii/employer_participation.jpg"></A> </DIV></TD>
          <TD>
         
           <form style="100%" name="YourFormName" method="Post" action="cf_employer_participation.asp" onSubmit="return checkForm(this);">
            <DIV class=right_block>
            <DIV class=highligts><font color="red"><b>*</b></font> denotes required field</DIV>            
           <DIV class=item><SPAN class=title><b><font color="red"><b> * </b></font>Industry category : </SPAN>
            <SELECT name="industrycategory" class=f-textName id="industrycategory" onchange="showDiv ();">
        <OPTION value="" selected class=f-textName>Select One</OPTION>
        <OPTION value="Apprentices" class=f-textName>Apprentices</OPTION>
        <OPTION value="Business / Employer Associations" class=f-textName>Business / Employer Associations</OPTION>
        <OPTION value="Educators High School" class=f-textName>Educators High School</OPTION>
        <OPTION value="Educators Post-Secondary" class=f-textName>Educators Post-Secondary</OPTION>
            <OPTION value="Employees / Journeypersons" class=f-textName>Employees/Journeypersons</OPTION>
            <OPTION value="Employer/Private/Construction" class=f-textName>Employer/Private/Construction</OPTION>
            <OPTION value="Employer/Private/Manufacturing" class=f-textName>Employer/Private/Manufacturing</OPTION>
            <OPTION value="Employer/Private/Service" class=f-textName>Employer/Private/Service</OPTION>
        <OPTION value="Employer/Private/Transportation" class=f-textName>Employer/Private/Transportation</OPTION>
        <OPTION value="Employer Public Sector" class=f-textName>Employer Public Sector</OPTION>            
        <OPTION value="Governments" class=f-textName>Governments</OPTION>
        <OPTION value="Labour" class=f-textName>Labour</OPTION>            
        <OPTION value="NGOs" class=f-textName>NGOs</OPTION>
        <OPTION value="Unions" class=f-textName>Unions</OPTION>
        <OPTION value="Parents" class=f-textName>Parents</OPTION>
        <OPTION value="Research Organizations" class=f-textName>Research Organizations</OPTION>
        <OPTION value="Sector Councils" class=f-textName>Sector Councils</OPTION>
        <OPTION value="Students" class=f-textName>Students</OPTION>
        <OPTION value="Other" class=f-textName>Other</OPTION></SELECT></DIV>
            <DIV class=item style="display:none;" id="detail">
            <SPAN class=title><b>&nbsp;&nbsp;&mdash; Do you hire apprentices at the present time :</b></SPAN>
           <INPUT class="button2" onclick="document.getElementById('specialyes').style.display=''" tabIndex=30 type=radio value="1" name=specialreq> Yes
            <INPUT class="button2" onclick="document.getElementById('specialyes').style.display='none'" tabIndex=30 type=radio value="0" name=specialreq> No
            <SPAN id=specialyes style="DISPLAY: none"><br>
        <SPAN class=item><B>Please specify:</b></span>
            <input  name="othertxt" type="text" id="othertxt" size="40"></span></div>
     <br>
        if the user select OTHER this field should show please
        <DIV class=item id="other" style="display:none;"><SPAN class=title><b><font color="red"><b> * </b></font>Other Industry category : </SPAN>
        <input  name="otherIndustryCategory" type="text" id="otherIndustryCategory"
size="40"></span></div>
        
        <DIV class="item last" id="itemlast"><SPAN class=title><b><font color="red"><b> * </b></font>Province/Territory :</SPAN>
        <SELECT name="txtprovince" class=f-textName>
        <OPTION value="" selected>Select One</OPTION>
        <OPTION value=AB class=f-textName>Alberta</OPTION>
        <OPTION value=BC class=f-textName>British Columbia</OPTION>
        <OPTION value=MB class=f-textName>Manitoba</OPTION>
        <OPTION value=NB class=f-textName>New Brunswick</OPTION>
        <OPTION value=NF class=f-textName>Newfoundland and Labrador</OPTION>
        <OPTION value=NT class=f-textName>Northwest Territories</OPTION>
        <OPTION value=NS class=f-textName>Nova Scotia</OPTION>
        <OPTION value=NU>Nunavut</OPTION>
        <OPTION value=ON class=f-textName>Ontario</OPTION>
        <OPTION value=PE>Prince Eard Island</OPTION>
        <OPTION value=QC class=f-textName>Qubec</OPTION>
        <OPTION value=SK class=f-textName>Saskatchewan</OPTION>
        <OPTION value=YK>Yukon Territory</OPTION>
        <OPTION value=Other class=f-textName>Other</OPTION></SELECT></DIV>    
       <div align="center"><INPUT class=butt title="Send" type="submit" alt="Send" src="" value="Send">
      <INPUT class=butt title="Reset" type="reset" alt="reset" src="" value="Reset">
     
       <INPUT type=hidden

      value=cmVxVzdGZvcnF1b3RlX2Zvcm1fbmFtZSxyZXF1ZXN0Zm9ycXVvdGVfZm9ybV9tZXNzYWdlLHJlcXVlc3Rmb3Jx90ZV9mb3JtX2VtYWlsLHJlcXVlc3Rmb3Jx90ZV9mb3JtX3Bob25lLHJlcXVlc3Rmb3Jx90ZV9mb3JtX2NvbXBhbnkscmVxVzdGZvcnF1b3RlX2Zvcm1fZmlsZSxyZXF1ZXN0Zm9ycXVvdGVfZm9ybV9hZGRpbmZv

      name=_it_fs></FORM></div>
      </em></DIV></DIV></TD></TR></TBODY></TABLE></DIV></DIV>
      <DIV style="PADDING-BOTTOM: 5px">The reports/documents listed on this page reflect the opinion of the individual authors and do not necessarily reflect the opinions of the Canadian Apprenticeship Forum  Forum canadien sur lapprentissage (CAF-FCA).</DIV>
      </DIV><BR><BR>
<BR><BR><BR></DIV></DIV>
</body>
</html>
0
 
elieazziAuthor Commented:
80% is coming, :) wow.

I will select from
              Industry category :  ^ Employer/Private/Construction ^
Then I change my mind and I select from
              Industry category :  ^ Other ^

The bugs is that the msg - Do you hire ... still show it should desappear.
    Do you hire apprentices at the present time :  Yes  No    Please specify:

Can u please test it.

thank you Eirk!

Other
0
 
elieazziAuthor Commented:
0
 
erikTsomikSystem Architect, CF programmer Commented:
try this
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
       function showDiv() {
                var x = document.getElementById('industrycategory').value;
                  if (x=='Employer/Private/Transportation' || x=='Employer/Private/Construction' || x=='Employer/Private/Manufacturing' || x=='Employer/Private/Service'){
                                document.getElementById('detail').style.display='block';
                               
document.getElementById('other').style.display='none';
                        }
else if (x=='Other') {
document.getElementById('other').style.display='block';
document.getElementById('detail').style.display='none';

}
                else {
                        document.getElementById('detail').style.display='none';
                     
document.getElementById('other').style.display='none';
                        }
               
                }
 
 
</script>
</head>
 
<body>
<TABLE cellSpacing=0 cellPadding=0 border=0>
        <TBODY>
        <TR>
          <TD>
            <DIV class=left_block><A

            onclick="view_picure ('http://www.caf-fca.org/en/ii/employerparticipation.jpg', 465, 599, 'view_picure'); return false"

            href="http://www.caf-fca.org/files/access/Return_On_Training_Investment-Employers_report.pdf"><IMG

            title="Strategies to increase employer participation in apprenticeship training in Canada" alt="Strategies to increase employer participation in apprenticeship training in Canada"

            src="../ii/employer_participation.jpg"></A> </DIV></TD>
          <TD>
         
           <form style="100%" name="YourFormName" method="Post" action="cf_employer_participation.asp" onSubmit="return checkForm(this);">
            <DIV class=right_block>
            <DIV class=highligts><font color="red"><b>*</b></font> denotes required field</DIV>            
           <DIV class=item><SPAN class=title><b><font color="red"><b> * </b></font>Industry category : </SPAN>
            <SELECT name="industrycategory" class=f-textName id="industrycategory" onchange="showDiv ();">
        <OPTION value="" selected class=f-textName>Select One</OPTION>
        <OPTION value="Apprentices" class=f-textName>Apprentices</OPTION>
        <OPTION value="Business / Employer Associations" class=f-textName>Business / Employer Associations</OPTION>
        <OPTION value="Educators High School" class=f-textName>Educators High School</OPTION>
        <OPTION value="Educators Post-Secondary" class=f-textName>Educators Post-Secondary</OPTION>
            <OPTION value="Employees / Journeypersons" class=f-textName>Employees/Journeypersons</OPTION>
            <OPTION value="Employer/Private/Construction" class=f-textName>Employer/Private/Construction</OPTION>
            <OPTION value="Employer/Private/Manufacturing" class=f-textName>Employer/Private/Manufacturing</OPTION>
            <OPTION value="Employer/Private/Service" class=f-textName>Employer/Private/Service</OPTION>
        <OPTION value="Employer/Private/Transportation" class=f-textName>Employer/Private/Transportation</OPTION>
        <OPTION value="Employer Public Sector" class=f-textName>Employer Public Sector</OPTION>            
        <OPTION value="Governments" class=f-textName>Governments</OPTION>
        <OPTION value="Labour" class=f-textName>Labour</OPTION>            
        <OPTION value="NGOs" class=f-textName>NGOs</OPTION>
        <OPTION value="Unions" class=f-textName>Unions</OPTION>
        <OPTION value="Parents" class=f-textName>Parents</OPTION>
        <OPTION value="Research Organizations" class=f-textName>Research Organizations</OPTION>
        <OPTION value="Sector Councils" class=f-textName>Sector Councils</OPTION>
        <OPTION value="Students" class=f-textName>Students</OPTION>
        <OPTION value="Other" class=f-textName>Other</OPTION></SELECT></DIV>
            <DIV class=item style="display:none;" id="detail">
            <SPAN class=title><b>&nbsp;&nbsp;&mdash; Do you hire apprentices at the present time :</b></SPAN>
           <INPUT class="button2" onclick="document.getElementById('specialyes').style.display=''" tabIndex=30 type=radio value="1" name=specialreq> Yes
            <INPUT class="button2" onclick="document.getElementById('specialyes').style.display='none'" tabIndex=30 type=radio value="0" name=specialreq> No
            <SPAN id=specialyes style="DISPLAY: none"><br>
        <SPAN class=item><B>Please specify:</b></span>
            <input  name="othertxt" type="text" id="othertxt" size="40"></span></div>
     <br>
        if the user select OTHER this field should show please
        <DIV class=item id="other" style="display:none;"><SPAN class=title><b><font color="red"><b> * </b></font>Other Industry category : </SPAN>
        <input  name="otherIndustryCategory" type="text" id="otherIndustryCategory"
size="40"></span></div>
        
        <DIV class="item last" id="itemlast"><SPAN class=title><b><font color="red"><b> * </b></font>Province/Territory :</SPAN>
        <SELECT name="txtprovince" class=f-textName>
        <OPTION value="" selected>Select One</OPTION>
        <OPTION value=AB class=f-textName>Alberta</OPTION>
        <OPTION value=BC class=f-textName>British Columbia</OPTION>
        <OPTION value=MB class=f-textName>Manitoba</OPTION>
        <OPTION value=NB class=f-textName>New Brunswick</OPTION>
        <OPTION value=NF class=f-textName>Newfoundland and Labrador</OPTION>
        <OPTION value=NT class=f-textName>Northwest Territories</OPTION>
        <OPTION value=NS class=f-textName>Nova Scotia</OPTION>
        <OPTION value=NU>Nunavut</OPTION>
        <OPTION value=ON class=f-textName>Ontario</OPTION>
        <OPTION value=PE>Prince Eard Island</OPTION>
        <OPTION value=QC class=f-textName>Qubec</OPTION>
        <OPTION value=SK class=f-textName>Saskatchewan</OPTION>
        <OPTION value=YK>Yukon Territory</OPTION>
        <OPTION value=Other class=f-textName>Other</OPTION></SELECT></DIV>    
       <div align="center"><INPUT class=butt title="Send" type="submit" alt="Send" src="" value="Send">
      <INPUT class=butt title="Reset" type="reset" alt="reset" src="" value="Reset">
     
       <INPUT type=hidden

      value=cmVxVzdGZvcnF1b3RlX2Zvcm1fbmFtZSxyZXF1ZXN0Zm9ycXVvdGVfZm9ybV9tZXNzYWdlLHJlcXVlc3Rmb3Jx90ZV9mb3JtX2VtYWlsLHJlcXVlc3Rmb3Jx90ZV9mb3JtX3Bob25lLHJlcXVlc3Rmb3Jx90ZV9mb3JtX2NvbXBhbnkscmVxVzdGZvcnF1b3RlX2Zvcm1fZmlsZSxyZXF1ZXN0Zm9ycXVvdGVfZm9ybV9hZGRpbmZv

      name=_it_fs></FORM></div>
      </em></DIV></DIV></TD></TR></TBODY></TABLE></DIV></DIV>
      <DIV style="PADDING-BOTTOM: 5px">The reports/documents listed on this page reflect the opinion of the individual authors and do not necessarily reflect the opinions of the Canadian Apprenticeship Forum  Forum canadien sur lapprentissage (CAF-FCA).</DIV>
      </DIV><BR><BR>
<BR><BR><BR></DIV></DIV>
</body>
</html>
0
 
elieazziAuthor Commented:
EXCELLENT THIS THE CODE I WANT....

But can u take out this part of this form
                         Please specify:   ^                   ^
i don't want anymore please specify, just keep do you hire apprentice yes or no.

and that'it thank you very much for you all your help !!
0
 
elieazziAuthor Commented:
EXCELLENT EXPERT !!!!!!!!
0
 
elieazziAuthor Commented:
Thank you for your help, i will have more questions coming in the near future. Specially this one i would liek to add to an access database.
0
 
erikTsomikSystem Architect, CF programmer Commented:
Thank you for the points
0
 
elieazziAuthor Commented:
you're welcome i'm posting a question about the script to make it mandatary.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.