C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » Javascript »

populating caste in dropdownlist based on religion selection


Posted Date: 30 Sep 2008    Resource Type: Code Snippets    Category: Javascript
Author: mahalakshmiMember Level: Gold    
Rating: 1 out of 5Points: 5



List of caste in dropdown-Ready to use

var hindu=new Array("-Select-","Any","AdiDravida","Arunthathiyar","Boyer","Brahmin","Brahmin-Grukkal","Brahmin-Iyer","Chettiar","Devendra Kula Vellalar","Goundar","Intercaste","Maruthuvar","Meenavar","Mudhaliyar","Mukkulathor","Caste No Bar");

var muslim=new Array("-select-","Any","Ansari","Arain","Awan","Bohra","Dekkani","Dudekula","Hanafi","Jat","Khoja","Lebbai","Malik","Mapila","Maraicar","Memon","Mugal","Pathan","Qureshi","Rajput","Rowther","caste no Bar");

var christian=new Array("-select-","Any","Born Again","Bretheren","Church of South India","Evangelist","Jacobite","Knanaya","Malankara","Marthoma","Pentacost","Roman catholic","Syrian Catholic","caste no Bar");

var buddhist=new Array("-select-","Any","caste no Bar");


function opt(x,y)
{
op=document.createElement("OPTION");
op.text=y;
op.Value=y;
x.options.add(op);

}
function change()
{
var rel=document.getElementById("preligion").selectedIndex;
alert(rel);
var cas1=document.getElementById("pcaste");
switch(rel)
{
case 1:
cas1.options.length=0;
for(var i=0;i<hindu.length;i++)
{
opt(cas1,hindu[i]);
}
break;

case 2:
cas1.options.length=0;
for(var i=0;i<muslim.length;i++)
{
opt(cas1,muslim[i]);
}
break;
case 3:
cas1.options.length=0;
for(var i=0;i<christian.length;i++)
{
opt(cas1,christian[i]);
}
break;
case 4:

cas1.options.length=0;
for(var i=0;i<buddhist.length;i++)
{
opt(cas1,buddhist[i]);
}
break;
}
}



Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Religion selection  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Date Format in JavaScript
Previous Resource: How to resctric image type selection in fileupload control
Return to Discussion Resource Index
Post New Resource
Category: Javascript


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use