Replace node.childNodes[1] with node.getElementsByTagName(“select”)[0]
The second one will work the same in all browsers.
I’ve tried this and a couple variations and it’s still not working
(removed added value, used element 1 instead of 0 - default comes up but freezes…)
Still not sure what I’m doing wrong
-D
496 scheduler.form_blocks[“div_editor”] = {
497 render:function(sns) {
498 var id = scheduler.getState().select_id;
499
500 var divs = “<?php
501 $divs = sess_get(‘setup’,‘divs_selected’);
502 $divs = explode(’,’,$divs);
503 $loop = 0;
504 foreach ($divs as $div) {
505 $loop++;
506 if ($loop == 1) {
507 echo ‘’ . $div . ‘’;
508 }
509 else {
510 echo ‘’ . $div . ‘’;
511 }
512 //echo ‘’ + $div + ‘’;
513 }
514 ?>”;
515 return "
516 },
517 set_value:function(node, value, ev) {
518 //node.childNodes[1].value = value || “”;
519 node.getElementsByTagName(“select”)[0].value = value || “”;
520 },
521 get_value:function(node, ev) {
522 //return node.childNodes[1].value;
523 return node.getElementsByTagName(“select”)[0].value
524 },
525 focus:function(node) {
526 //var a = node.childNodes[1];
527 var a = node.getElementsByTagName(“select”)[0];
528 a.select();
529 a.focus();
530 }
531 };
I’m going to revert to the standard list box, but thanks anyway for helping.
So I won’t make my editor box.
It would be nice if you could set the width size since my division list is only 2 characters!
Thanks,
David