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 Like 51 Dislike
Previous forums Next forums
Other forums

How to ask a regex question?
Hi, I thought I'd share some of my insight after seeing too many bad questions that either get ignor

How to calculate days from variable date?
This will be easy for one of you gurus. I want to fetch the date from a variable date, for example:<

MYSQL gen help
This is my Mysql gen. can anyone tell me why this echos

MID(networkset.networkid, 3, 3) AS &q

How to make a input/output field with multiple lines
Hello.
I put a input/output field on the screen but I could not change height of it. I need to

Why does my php page download images over and over
Can anybody please explain to me why my php page keeps downloading the images and other items every

no idea what to do...
I'm fed up. I had issues with code that I have working on a different site that didn't work on my cu

PHP header help!
Hi all I am trying to get this php page to refresh every 5 seconds on my phone which is an aastra 48

Alternate messaging
I have 4 strings in MySQL db1

$string1 : Hello
$string2 : Hi
$string3 : Great
$strin

Help with setcookie()
Merry Xmas to those on this foruum
Older guy here with some experience but not allot so please be

UPLOAD IMAGES NOT WORKING!
Hi there i have a upload script in which it uploads the picture to a folder than creates two thumbna

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash