Project

General

Profile

1 2 Manuela
    function add_child_page(page_id)
2
    {
3
        //find and select the page in the parent dropdown
4
        var selectBox = document.add.parent;
5
console.info(selectBox);
6
        for (var i = 0; i < selectBox.options.length; i++)
7
        {
8
              if (selectBox.options[i].value == page_id)
9
              {
10
                    selectBox.selectedIndex = i;
11
                    break;
12
              }
13
        }
14
        //set focus to add form
15
        document.add.title.focus();
16
    }