Click here to Skip to main content
15,908,618 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionEnhanced Dropdownlist Pin
Vsree31-Jan-07 19:00
Vsree31-Jan-07 19:00 
AnswerRe: Enhanced Dropdownlist Pin
Vasudevan Deepak Kumar31-Jan-07 19:29
Vasudevan Deepak Kumar31-Jan-07 19:29 
GeneralRe: Enhanced Dropdownlist Pin
Vsree31-Jan-07 19:39
Vsree31-Jan-07 19:39 
AnswerRe: Enhanced Dropdownlist Pin
Vsree31-Jan-07 20:16
Vsree31-Jan-07 20:16 
QuestionAdd elements from one ListBox to another ListBox Using JavaScript Pin
varshavmane31-Jan-07 18:10
varshavmane31-Jan-07 18:10 
AnswerRe: Add elements from one ListBox to another ListBox Using JavaScript Pin
Venkatesh Mookkan31-Jan-07 18:23
Venkatesh Mookkan31-Jan-07 18:23 
GeneralRe: Add elements from one ListBox to another ListBox Using JavaScript Pin
varshavmane31-Jan-07 18:56
varshavmane31-Jan-07 18:56 
GeneralRe: Add elements from one ListBox to another ListBox Using JavaScript Pin
Venkatesh Mookkan1-Feb-07 0:15
Venkatesh Mookkan1-Feb-07 0:15 
The corrected script is,

<script language="JavaScript">
    function f_optionMove(s_from, s_to)
    {
        var e_from = document.forms['test_form'].elements[s_from],e_to   = document.forms['test_form'].elements[s_to];
        if (!e_from)
            return alert ("Error: selectbox with name '" + s_from + "' can't be found.");
        if (!e_to)
            return alert ("Error: selectbox with name '" + s_from + "' can't be found.");
        var n_moved = 0;
        for (var i = 0; i < e_from.options.length; i++)
        {
            if (e_from.options[i].selected)
            {
                e_to.options[e_to.options.length] = new Option(e_from.options[i].text, e_from.options[i].value);
                n_moved++;
            }
            else if (n_moved)
                e_from.options[i - n_moved] = new Option(e_from.options[i].text, e_from.options[i].value);
        }
        if (n_moved)
            e_from.options.length = e_from.options.length - n_moved;
        else
            alert("You haven't selected any options");
        }

        function f_optionMoveAll(s_from, s_to)
        {
            var e_from = document.forms['test_form'].elements[s_from],e_to   = document.forms['test_form'].elements[s_to];
            if (!e_from)
                return alert ("Error: selectbox with name '" + s_from + "' can't be found.");
            if (!e_to)
                return alert ("Error: selectbox with name '" + s_from + "' can't be found.");
            e_to.options.length = 0;
            for (var i = 0; i < e_from.options.length; i++)
                e_to.options[e_to.options.length] = new Option(e_from.options[i].text, e_from.options[i].value);
            e_from.options.length = 0;
        }

        function f_selectAll (s_select)
        {
            var e_select = document.forms['test_form'].elements[s_select];
            for (var i = 0; i < e_select.options.length; i++)
                e_select.options[i].selected = true;
        }
</script>



Regards,
Venkatesh Mookkan.
Software Engineer, India
My: Website | Yahoo Group

Questiontext highlight in pdf files Pin
amrtita31-Jan-07 18:05
amrtita31-Jan-07 18:05 
QuestionWriting the contents of response object into an ExcelSheet Pin
crazy_mads31-Jan-07 16:39
crazy_mads31-Jan-07 16:39 
Questionlogin form Pin
saravanan0531-Jan-07 12:27
saravanan0531-Jan-07 12:27 
AnswerRe: login form Pin
minhpc_bk31-Jan-07 14:15
minhpc_bk31-Jan-07 14:15 
AnswerRe: login form Pin
ednrgc1-Feb-07 3:53
ednrgc1-Feb-07 3:53 
QuestionASP.net/SQL newbie Question Pin
Planker31-Jan-07 11:02
Planker31-Jan-07 11:02 
AnswerRe: ASP.net/SQL newbie Question Pin
minhpc_bk31-Jan-07 14:10
minhpc_bk31-Jan-07 14:10 
GeneralRe: ASP.net/SQL newbie Question Pin
Planker31-Jan-07 16:47
Planker31-Jan-07 16:47 
GeneralRe: ASP.net/SQL newbie Question Pin
minhpc_bk1-Feb-07 0:08
minhpc_bk1-Feb-07 0:08 
QuestionClicking on data in a GridView Pin
dptalt31-Jan-07 10:22
dptalt31-Jan-07 10:22 
AnswerRe: Clicking on data in a GridView Pin
minhpc_bk31-Jan-07 14:09
minhpc_bk31-Jan-07 14:09 
GeneralRe: Clicking on data in a GridView Pin
badgrs31-Jan-07 22:23
badgrs31-Jan-07 22:23 
Questioncurrentdate Pin
saravanan0531-Jan-07 10:20
saravanan0531-Jan-07 10:20 
AnswerRe: currentdate Pin
Guffa31-Jan-07 10:49
Guffa31-Jan-07 10:49 
GeneralRe: hi guffa Pin
saravanan0531-Jan-07 11:14
saravanan0531-Jan-07 11:14 
AnswerRe: hi guffa Pin
Guffa31-Jan-07 13:52
Guffa31-Jan-07 13:52 
AnswerRe: hi guffa Pin
Venkatesh Mookkan31-Jan-07 15:38
Venkatesh Mookkan31-Jan-07 15:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.