hello

I am trying to do something like this, but there is no way
http://blazonry.com/javascript/selmenu.php

<form  name="form" action="<?php echo $html->url('/users/add'); ?>"
method="post">

        <?php echo $html->selectTag('User/LanguagesList', $languages,
null,
array('multiple' => 'multiple','size' =>          '6'), false); ?>

        <?php echo $html->selectTag('Language/Language', array(),
null,
array('size' => '6','multiple' => 'multiple'),            false); ?>

        <p><input type="button"
onClick="moveSelectedOptions(this.form.data[User][LanguagesList]
        [],this.form.data[Language][Language][])" value=" >> " ></p>

<script type="text/javascript" src="/js/scripts.js"></script>

content of  scripts.js

function moveSelectedOptions(from,to) {
        // Unselect matching options, if required
        if (arguments.length>3) {
                var regex = arguments[3];
                if (regex != "") {
                        unSelectMatchingOptions(from,regex);
                        }
                }
        // Move them over
        for (var i=0; i<from.options.length; i++) {
                var o = from.options[i];
                if (o.selected) {
                        to.options[to.options.length] = new
Option( o.text, o.value, false,
false);
                        }
                }
        // Delete them from original
        for (var i=(from.options.length-1); i>=0; i--) {
                var o = from.options[i];
                if (o.selected) {
                        from.options[i] = null;
                        }
                }
        if ((arguments.length<3) || (arguments[2]==true)) {
                sortSelect(from);
                sortSelect(to);
                }
        from.selectedIndex = -1;
        to.selectedIndex = -1;
        }

What am I doing wrong? THANKS

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to