Sathish David Kumar N
asked on
how to remove drop down values while adding
Hi ,
I have dropdown which is dynamically created .(user how many need the will create that much drop down box).
I want to remove the drop down box with out value while saving time .. how to do that ?
I have dropdown which is dynamically created .(user how many need the will create that much drop down box).
I want to remove the drop down box with out value while saving time .. how to do that ?
div id="headNo1">
<select name="headNo1" id="headNo1">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
</select>
</div>
<div id="headNo2">
<select name="headNo2" id="headNo2">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
</select>
</div>
<div id="headNo3">
<select name="headNo3" id="headNo3">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
</select>
</div>
Please elaborate your problem...
ASKER
I have dropdown which is dynamically created by user how much they need . In below code it will add headno1 to headno(n) value.
for example :user create 5 drop downs .
headno1,headno2,headno3,he adno4,head no5
but the fill only 3 values remain 2 values are select Head Value
headno1 =5
headno2=select Head Value
headno3 =4
headno4 =9
headno5 =select Head value
While adding(Saving) i want to remove headno2,headno5 and pass remaining 3 values to back end
like that i want to .. How to achieve this ??
for example :user create 5 drop downs .
headno1,headno2,headno3,he
but the fill only 3 values remain 2 values are select Head Value
headno1 =5
headno2=select Head Value
headno3 =4
headno4 =9
headno5 =select Head value
While adding(Saving) i want to remove headno2,headno5 and pass remaining 3 values to back end
like that i want to .. How to achieve this ??
div id="headNo1">
<select name="headNo1" id="headNo1">
<option value="x">Select Head Value</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
</select>
</div>
<div id="headNo2">
<select name="headNo2" id="headNo2">
<option value="x">Select Head Value</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
</select>
</div>
<div id="headNo3">
<select name="headNo3" id="headNo3">
<option value="x">Select Head Value</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
</select>
</div>
On form's onBeforeSubmit event check for select Head Value if found remove those heads.
ASKER
Save button is a image , So when click the image i want to remove that time
On the back-end, you can check the value of the inputs before save it and if the value equal "x" just ignore it.
ASKER
Ahmed Merghani--------- Thanks for your Info .... :D :D ..
That drop down list is used lot of files and lot of tables so that is not possible in back end ... Some condition and some other screen i need to add x value ....
So that is not possible before saving ....
That drop down list is used lot of files and lot of tables so that is not possible in back end ... Some condition and some other screen i need to add x value ....
So that is not possible before saving ....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks Mukesh Yadav... Its not generic thats is the problem . Can you help to make it generic one .