SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
Thread: Popup sending info to parent
-
Apr 11, 2007, 09:37 #1
- Join Date
- Mar 2005
- Posts
- 166
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Popup sending info to parent
Hi,
I have a parent page that sends a variable to a popup. On the popup, there´s a recordset that perform the search based on it and then place the result into several hidden inputs.
Then via js, I send them back to the parent filling a few inputs there.
My question:
The send_info function on popup only sends the first word (only until the first space) from the recordset. Anyone wknos why and how to correct it?
Example:
Recordset value=Marcelo junior
Value placed on parent page=Marcelo
-
Apr 11, 2007, 20:36 #2
- Join Date
- Nov 2005
- Posts
- 113
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Could be done like this
window.parent.document.getElementById('your_element') = 'Marcelo junior';
How are you doing it right now?
-
Apr 12, 2007, 05:15 #3
- Join Date
- Mar 2005
- Posts
- 166
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yes, sorry i didn´t posted my js, but it´s quite like that. Although I place the result of my recordset into a hidden input on pupop as value and then send it to parent instead of simple declare it´s value as you wrote.
opener.myparentinput.value=document.formpupop.popupinput.value;
But as I said, once sent to parent, I only see the first word on my parent text input.
-
Apr 12, 2007, 06:02 #4
- Join Date
- Nov 2005
- Posts
- 113
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
What you did should work ... sometimes the simplest things get you, but does the form field in question have a "maxlength" that is too small? and you are sure the value inserted into the hidden input field is correct to begin with?
-
Apr 12, 2007, 07:58 #5
- Join Date
- Mar 2005
- Posts
- 166
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
No, there´s no maxlenght on my input, just type and value are setted;
Yes, I´m positive. I also do the response.write on the popup, for the value that fills the input and show me the full description and not only the first word.
Seems like it´s due the js function. Any clue?
-
Apr 12, 2007, 08:15 #6
- Join Date
- Mar 2005
- Posts
- 166
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Bookmarks