SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot
    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

  2. #2
    SitePoint Zealot
    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?

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    166
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by abb View Post
    Could be done like this
    window.parent.document.getElementById('your_element') = 'Marcelo junior';

    How are you doing it right now?
    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.

  4. #4
    SitePoint Zealot
    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?

  5. #5
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    166
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by abb View Post
    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?
    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?

  6. #6
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    166
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by abb View Post
    ... sometimes the simplest things get you...
    The best advise I could found...
    Can you belive that?
    No working properly:
    HTML Code:
    <input name=myinput type=hidden value=<&#37;redordset("value_from_db")%> >
    Working good:
    HTML Code:
    <input name=myinput type=hidden value="<%redordset("value_from_db")%>" >
    Thanks.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •