kiran peter
Jul 7 2009, 12:28 AM
Hi,
I want to load google site in my iframe. I am creating iframe dynamically and trying to laod using open() function.
iframe.name = "myframe";
iframe.width = "500px";
iframe.height = "500px";
iframe.frameborder = "none";
iframe.style.border = "none";
iframe.style.allowtransparency = "true";
iframe.style.margin = "1px";
iframe.scrolling = "yes";
user.chatW = open("google.com","myframe","width=250,height=255,resizable=yes");
can i load this new window in the above iframe ?
Thanks in adavnce
Kiran
pandy
Jul 7 2009, 01:09 AM
No. A new window and a frame are two different things. With HTML you use the target attribute and the name of the frame,
http://htmlhelp.com/faq/html/frames.html#frame-target . With JS you do something like this, again using the name of the frame.
CODE
myframe.location.href = 'http://google.com';
kiran peter
Jul 7 2009, 02:07 AM
Hi,
Actually i am devloping a chat application using jwchat.In jwchat on receiving message it open a window and show message.So i am planning to load that window in iframe as we all see in social nwtwok like orkut and all.
Can u give any advice or any links to refer about it.
Thanks
Kiran
pandy
Jul 7 2009, 03:02 AM
Well, I don't see anything in orkut since I don't use it, so I don't know what you mean. Don't you want to load google.com in the iframe instead of in the popup?
kiran peter
Jul 7 2009, 04:26 AM
Hi
I actually mean i want to load chat window into a iframe rather than as popup.
Thanks
Kiran
pandy
Jul 7 2009, 07:17 AM
OK, you still do it as I told you.
kiran peter
Jul 7 2009, 11:41 PM
Hi.
I tried it but in that case I will get only iframe object.And in my chat application I need window object,beacuse rest of coding is based on window object It works in FireFox but problem in IE.
Thanks
Dhaneesh
pandy
Jul 8 2009, 12:08 AM
And if you use the name of the frame? Instead of window.whatever use name_of_frame.whatever.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.