Closed
Bug 280912
Opened 20 years ago
Closed 20 years ago
Javascript can't access a textarea field in another window
Categories
(Toolkit Graveyard :: Error Console, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: consultor, Assigned: bugs)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050202 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050202 Firefox/1.0+
The code below is not working.
<script language="javascript">
function selImage(imgName) {
window.opener.frmComment.txtComment.value =
window.opener.frmComment.txtComment.value + ' ' + imgName
}
</script>
It's supposed to send some text to a Textarea in a form in another window, but
it's doing it.
Here's the source code that calls the function:
<IMG SRC="black/smile.gif" onclick="selImage(' :smile: ')"
style="cursor:hand;"></CENTER></TD><TD style="{font-size:11px;}">:smile: ou :)
Reproducible: Always
Steps to Reproduce:
1) Enter http://cora.blogspot.com
2) Click in any "[x] comentários" link
3) In the bottom of the new opened window, click in 'Smilies' link
4) Choose an smiley by clicking the it's image
5) The smiley text *is not* sent to the opener window
Actual Results:
Nothing happened.
Expected Results:
To send some text to a Textarea in a form in another window.
Comment 1•20 years ago
|
||
window.opener is a reference to a window. You need a reference to that window's document. Try window.opener.document.frmComment.txtComment.value += ' ' + imgName;
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Updated•16 years ago
|
Product: Firefox → Toolkit
Updated•8 years ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•