travisbrown (TechnicalUser) |
10 May 07 1:07
|
I'm trying to set the value/innerHTML of a text area in a parent page from a
popup. Is there anything obviously wrong with the script below? The first two elements are passing back properly. job_desc is not working with either innerHTML or value. I've double-checked that the id names are correct, and I'm not getting any errors in the FF error console.
CODE
<script type="text/javascript">
function transferTemplate(id) { window.opener.document.getElementById('job_mini_desc').value = document.getElementById('job_mini_desc_' + id).value; window.opener.document.getElementById('job_title').value = document.getElementById('job_title_' + id).value; window.opener.document.getElementById('job_desc').value = document.getElementById('job_desc_' + id).value; //window.opener.document.getElementById('job_desc').innerHTML = document.getElementById('job_desc_' + id).value //self.close(); } </script> The target element is CODE
<textarea name="job_desc" id="job_desc">
</textarea> |
Tek-Tips Forums is Member Supported. Click Here to donate.
|
|
|
本文转自kenty博客园博客,原文链接http://www.cnblogs.com/kentyshang/archive/2007/05/29/764011.html如需转载请自行联系原作者
kenty