TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
mohan raj
NA
57
11.7k
how to set the dropdown dependency in javascript using c#
Jul 8 2013 12:27 AM
Hi This Mohan,
my javascript code is
var states = new Array();
states['science'] = new Array('Select', 'PCMB', 'PCMC');
states['commerce'] = new Array('Select', 'SEBA','HEBA');
states['arts'] = new Array('Select', 'HEPS');
function setStates()
{
cntrySel = document.getElementById('ddlbranch');
stateList = states[cntrySel.value];
changeSelect('ddlsubcategory', stateList, stateList);
setCities();
}
function changeSelect(fieldID, newOptions, newValues)
{
selectField = document.getElementById(fieldID);
selectField.options.length = 0;
for (i = 0; i < newOptions.length; i++)
{
selectField.options[selectField.length] = new Option(newOptions[i], newValues[i]);
}
}
function addLoadEvent(func)
{
var oldonload = window.onload;
if (typeof window.onload != 'function')
{
window.onload = func;
}
else
{
window.onload = function ()
{
if (oldonload)
{
oldonload();
}
func();
}
}
}
addLoadEvent(function () { setStates(); });
when i use this code it's working but not storing the Database
my C# code is
obj.Combination = ddlsubcategory.Text;
ples help me how to solve this problem.
Reply
Answers (
6
)
For displaying output in mobile application .
drop down dependency in javascript using C#..