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
Not Inserting into DB
I can't get my Add new Division form to submit to the database. Anyone see my issue?
Code: &a
Add trigger to UpdatePanel programmatically
Hi,I'm working on a website which uses AJAX and Masterpages. What I have is an AJAX UpdatePanel whi
order by date not ID number help php
I am trying to orginize the following code to order by date not id number.
any help would be grea
session_destroy();
new to php
I have a simple login and am trying to write a logout.
I set a $_SESSION var to 1 i
AutoChoosing a CSS file based on URL
Hey everyone,
I have a site that has multiple URLs and CSS files.
Based on the URL tha
array & querys help/advice.
Ok so here goes , I have a mysql database and basically here's what I need to do.
// foreach
Frustrated php Newbie
First off, I am pretty much a PHP nub. I can read and understand the language (most of the time) so
How to clone an SAP ECC using bacup tape on z/os?
We want to clone our production to a different SID using backup tape.
BI in Upstream Production operations
Appreciate if you can assist in the following areas:
1) Examples of life before and after BI i
Relative path
I have a absolute path to an image - like so: C:/Program Files/Apache Software Foundation/Apache2.2/