PDA

View Full Version : innerHTML + popupWindow



alok_km
04-03-2006, 10:58 AM
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........

Twey
04-03-2006, 11:13 AM
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.

alok_km
04-03-2006, 12:21 PM
Thanks for the reply Twey.

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