August 6th, 2001, 03:47 PM
I'm trying to send some text from a pop-up to a form-input text field in another window.
I have this in the header of the main window:
And I want to enter text into the form field named "message" from the pop-up window (based on clicking on an href link in the pop-up).
self.name = "index";
Can this be done?
I'm trying to make a "smilies" pop-up for a message board that will display the smilies (which I've done) but then make the smilies clickable (as they are on this message board, for instance) so that the smiley character text is inputted to the message window.
August 6th, 2001, 05:55 PM
I haven't tested this out, but I believe it will work. You should be able to access the form in the parent window this way:
window.opener.document.form.field.value = "some value"
August 6th, 2001, 06:20 PM
So what would I include in my link?
I guess I just don't know which of those parts need to be changed (with values) and which need to stay as they are.
And I can't seem to add the code without the script parsing it. Grrrr....
Last edited by jough; August 6th, 2001 at 06:23 PM.
August 9th, 2001, 01:16 AM
Your link should look something like:
= smilie('')")><img src="(image link)"></a>
The "void" is there because otherwise the browser in your popup will try to navigate to the results of the assignment.
August 9th, 2001, 02:33 AM
Okay, but I still can't get this to work.
Do I just use the link as is, or do I have to substitute the name of the form, field, etc. And what would I put for "value" then?
I've pretty much tried and erred as much as I can - trying many different permutations.
I can make it work in IE but not Netscape or Opera.
It's just all so frustrating.
August 9th, 2001, 02:47 AM
You'll need to subsititute the following:
form -> the name of your form (e.g., <form name="myform">, would be "myform")
field -> the name of your input field (e.g., <input type="text" name="mytextfield"> would be "mytextfield">
value stays as is.
August 9th, 2001, 11:29 AM
I figured as much (and had tried that before, but without the "void").
But alas, this doesn't work in any browser. Maybe it's because of all of the includes - the pop-up may not know who its parent is.
August 9th, 2001, 08:17 PM
I motion that we, meaning anyone who reads this thread, hereby form a movement in the web development, and preferably, additionally the web browsing community, to boycott use of any Netscape browsing product from this point forward, to be repealed only if they release a browser which complies with basic standards of common decency. Recruit everyone you know. Give them a copy of Internet Explorer. Help them install it. Help them configure it. Help them banish Netscape Navigator from their system. Netscape is floundering: let us join forces and drive the final nail into it's beckoning coffin.
August 10th, 2001, 02:14 AM
I actually *like* Netscape usually, even though I've been using Opera mostly, now.
Oh, and window.opener doesn't work in Opera, either.
August 10th, 2001, 08:49 AM
It doesn't suprise me that it doesn't work in Opera, nor does it matter -- Opera is a joke, a total non-factor. Why should anyone PAY for a sub-standard browser???