Jump to content

appendChild Problem


kharbat

Recommended Posts

[code]            var file = "<?php echo $file_dir; ?>";
            
            parent_form = window.parent.document.getElementById('Send_Form');
            hidden = parent.document.createElement("input");
            
            hidden.name = "attachment_"+id;
            hidden.id = "attachment_"+id;
            hidden.type = "hidden";
            hidden.value = file;
            
            parent_form.appendChild(hidden);
        </script>  [/code]

This is a part of the orginal code, this code exists in a page inside inline frame. It attempts to create a hidden field in the parent page. There is an error in the last line.. how can i solve it??!!
on firefox it tells me "parent_form has no properties"
thanks
Link to comment
https://forums.phpfreaks.com/topic/12369-appendchild-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.