value not going in data base
         
               Posted on 
16th Feb 2014 07:03 pm by  
admin
        
        hello friends....
                    i am having a working javascript....when i am selecting any designation and refresh/validation problem the form is resetting the designation value and the designation value is not going into the database.....please look at the below code and suggest me how to make it work...
Code: [Select]function changeList(list1,list2) {
 list2.length = 0; 
 if(list1.options[list1.selectedIndex].value == 2) 
 { 
 addOption(list2,"ACTD","ACTD"); addOption(list2,"ALEC","ALEC"); addOption(list2,"ASOP","ASOP"); addOption(list2,"ASTP","ASTP"); 
 addOption(list2,"DIRO","DIRO"); addOption(list2,"DLIB","DLIB");addOption(list2,"LECT","LECT"); addOption(list2,"PFAT","PFAT"); 
 addOption(list2,"PROF","PROF");addOption(list2,"TA","TA"); addOption(list2,"VFAC","VFAC"); addOption(list2,"VPRF","VPRF"); 
 } 
 else if(list1.options[list1.selectedIndex].value == 3) 
 { 
 addOption(list2,"ACCO","ACCO"); addOption(list2,"APRG","APRG"); addOption(list2,"ASTR","ASTR"); addOption(list2,"COCH","COCH");
addOption(list2,"CSHR","CSHR"); addOption(list2,"CTOR","CTOR"); addOption(list2,"DRVR","DRVR"); addOption(list2,"DUDT","DUDT");
addOption(list2,"ELER","ELER"); addOption(list2,"FINO","FINO"); addOption(list2,"HSPT","HSPT"); addOption(list2,"JAAT","JAAT");
addOption(list2,"JOAT","JOAT"); addOption(list2,"JTEC","JTEC"); addOption(list2,"LABT","LABT"); addOption(list2,"LBST","LBST"); 
addOption(list2,"LIST","LIST");addOption(list2,"MEDA","MEDA"); addOption(list2,"MO","MO"); addOption(list2,"OFST","OFST"); 
addOption(list2,"PA","PA");addOption(list2,"PAST","PAST");addOption(list2,"PRGR","PRGR"); addOption(list2,"SCOP","SCOP"); 
addOption(list2,"SLAT","SLAT"); addOption(list2,"SMDA","SMDA"); addOption(list2,"SMDO","SMDO"); addOption(list2,"SNRS","SNRS");
 addOption(list2,"STCH","STCH");addOption(list2,"SUPV","SUPV"); addOption(list2,"WSPT","WSPT");  
 } 
 else if(list1.options[list1.selectedIndex].value == 4) 
 { 
 addOption(list2,"ATDT","ATDT");addOption(list2,"CHWK","CHWK"); 
 addOption(list2,"LIDT","LIDT"); addOption(list2,"NRSE","NRSE");
addOption(list2,"OAST","OAST"); 
  } 
 }
 </script>
Code: [Select]<body bgcolor="#cccccc" style="color:#000099" onload="changeList(document.forms.form2.emptyp,document.forms.form2.desig)" >
    <label>3. Employee Type</label> 
   <font color="##FF0000" >*</font>
    <select name="emptyp" onChange="changeList(document.forms.form2.emptyp,document.forms.form2.desig)">
      <option value="2" <?php if (isset($_POST['emptyp']) && $_POST['emptyp'] == '2') { echo "selected='selected'"; }?> >2 (Teaching faculty)</option>
      <option value="3" <?php if (isset($_POST['emptyp']) && $_POST['emptyp'] == '3') { echo "selected='selected'"; }?> >3 (Supporting staff)</option>
      <option value="4" <?php if (isset($_POST['emptyp']) && $_POST['emptyp'] == '4') { echo "selected='selected'"; }?> >4 (Helping staff)</option>
    </select>  
<label >9. Designation</label>
 <select name="desig" id="desig" value=""> </select> 
Code: [Select]$desig=($_POST['desig']);       
      
       
		No comments posted yet	
	Your Answer:
	        Login to answer
        
186   51
 51  
 
    
    
 
Other forums
understanding functions and classes 
Code: [Select]
class person {
   var $name = "Jimmy Goe";
   
function get_nam
Code Review - SQL and Insertion Attacks (Warning: Not for Newbs) 
Hey guys,
Its been a while, I know. Use to love coming here to answer peoples questions, but 
error with opendir  
when i do this
   if ($handle = opendir($dir)) {
   while (false !== ($file = readdir($han
Exporting new records 
Trying to figure out the best way to set this up.
People register my site. 
Their prof
array help 
Does anyone know how to require 10 text fields for individual grades and output class average? (10 p
Need Reporting Advice 
My SQL server doesn't support MS SQL reporting services that comes with SQL Enterprise or Express. T
Wierd echo error? 
Hi, i got the most wierd php error ever and i don't know why..
Code:         echo "<t
Hits this week counter 
I have a counter on my site that tracks hits, IP's, etc. into a mySQL database. It also includes the
Give me all your tricks for minimizing jar file size 
Hi, I'm coming close to releasing my J2ME game... I am kicking up against the 64k size barrier w
Get content from table into a list, without repeating. 
Alright this is kinda an odd thing, so I need some help.
I have a table "quote" wit