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
Other forums
Rand() help needed
Hi all,
Can someone explain and give me a quick example of how I would go about this?
reorder sql query
ok so i have this very simple code:
Code: $query = "SELECT search_keywords, COUNT(search_key
Rounding a number queried from a database
I know that to display a rounded number you just do echo "round($number)";. But how would
Attempt to assign property of non-object in...
I'm having issues with the following function in PHP 5...
function getTreeWithChildre
SAP Logon Failed
I tried to login to SAP through MMC.
When i click start and give password.
it
A rank users order by points
I want to make an insert from table 'rank' , with number (rank) from the cod blow, to fild users.ran
Inserting a check in checkbox from array value
Hello all,
I have a bit of code that works for a select option box, but does not work for my chec
Update Database
Hi All,
I have a problem with this:
Code: [Select]<?php
session_start();
How to show next and prev records
Hi all,
Sorry if this is simple, i'm very new to php, well, any programming language actually
PHP mail() with images
I'm trying to get images to send along with my HTML e-mail sent through PHP mail(). I only tried vie