kharbat Posted June 19, 2006 Share Posted June 19, 2006 [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 More sharing options...
nogray Posted June 20, 2006 Share Posted June 20, 2006 This worked find for me, just make sure all your variables are defined (like the id) and the form id in the parent window is 'Send_Form' Link to comment https://forums.phpfreaks.com/topic/12369-appendchild-problem/#findComment-47729 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.