Results 1 to 3 of 3

Thread: innerHTML + popupWindow

  1. #1
    Join Date
    Mar 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question innerHTML + popupWindow

    Hi All,

    I am generating a popup window which on loading calls a function which return some HTML code. PopWindow is HTML page containing a form and some buttons which uses AJAX.

    This HTML code is to be filled in a div in a parent window which has generated the pop up window.

    Can anybody suggest a way how I can do it using Javascript or HTML.

    I have tried
    document.my_form.resultdiv.innerHTML = <HTML Generated>

    \$('window.opener.document.my_form.resultdiv').innerHTML =<HTML Generated>

    ect.. and these things does not works for me .

    Please suggest something........

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Try window.opener.document.getElementById("resultdiv").innerHTML. Assuming resultdiv is the DIV's ID. If it's a name, use window.opener.document.getElementsByName("resultdiv")[0].innerHTML.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Mar 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the reply Twey.

    But this thing does not seems to help me. I have already tried that also.

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
  •