A very pertinent comment coming from an ASP document!
[EDIT: I agree with you wholeheartedly :)]
What does this output:
-
alert(opener.document.frm3.comment + '\n' + opener.document.frm3.comment.nodeName + '\n' + opener.document.frm3.comment.style.display + '\n' + opener.document.frm3.comment.style.visibility);
-
(I think that about covers it; the first two make sure you're getting the correct element, and the last two make sure it's visible.)
[EDIT: If you get an error instead of an alert box, then opener.document.frm3.comment is probably undefined. Try:
-
alert(opener.document.frm3.comment);
-
to confirm it.]
PBmods,
Thank you, but i've solved the problem now, as i suspected it involved adding the code from the RTE,
This code works now,
- <script langauge="javascript">
-
function Respond(){
-
opener.document.frm3.subject.value="RE:<%=SUBJECT%>";
-
opener.document.getElementById('WebWizRTE').contentWindow.focus();
-
-
}
-
</script>
Could you (or anyone else) suggest what i should add to the above to solve another little problem which is:
When someone clicks reply to the code above, the cursor now focusus on the RTE area, however, if the page is a long one, and the form is at the bottom, then the user doesn't see the cursor. He may not know that he has to scroll to the bottom of the page, to see the comment form he has to fill in. this is because even though the cursor has move to the RTE area, the page is still there, in the same spot even though the pop up comment window has diminished.
It would be good, if when the cursor hits the text area, and the pop up page is diminished in the bottom of the page, THE PAGE FOCUS MOVES TO THE TEXT AREA TOO.
Would appreciate any tips as to what to add to the javascript code above to make this happen.