I am building an sftp application. It has requirements to upload and download. To upload, a target folder that exists on the server needs to be set.

I have a jQuery folder tree that dynamically creates a tree view of a directory on the server. Currently in Firefox, Opera, and Chrome if someone clicks on a branch of the tree on the afterClick event I am able to get the target path by using the DOM via node.context.nextElementSibling.value; The code for the afterClick is:
                //get the path from the input located within the clickon node
                var full_path = node.context.nextElementSibling.value;

                if (typeof full_path != "undefined") {
                    var folder_target_path;
                    //find if path contains a (.) period to designate it has a file within the path
                    // if so then remove the file part of the path
                    var pathRE = /\./;
                    if (full_path.match(pathRE)){
                        folder_target_path = full_path.replace(/\/[^\/]*$/, '');
                    } else {
                        //set the folder path as is. File was not included in the path
                        folder_target_path = full_path;
                    var str_arr;
                    var end_folder = '';
                    str_arr = folder_target_path.match(/\/[^\/]*$/);
                    end_folder = str_arr[0].replace(/\//g, '');
                    var upload_target_path = "<input type='hidden' name='upload_target_path' value='" + folder_target_path + "' />";
                    $span_value_start = '<span style="color: green; font-weight: bold">';
                    $span_value_end = '</span>'
                            + end_folder
                            + upload_target_path
This is what the file tree dynamically created by jQuery looks like -- firefug output:

And what the hidden input looks like after the file tree has been selected as the target:

The problem I am having is that IE8 does not see the
so the target path is not set.

Do you have any ideas where I can find the value for the selected (not to be confused with submitted) tree branch and like node.context.nextElementSibling.value grab the value of the input next door to the clicked on li input?

In the case you can help, I've attempted to make a fairly complex application as simple for you to understand - hopefully it is enough .

Your ideas are appreciated.