open frame in new window

J

jasiu86

welcome,

I have this problem:
I open a new window in the frame that redirects the user to the page
with Gmail, and at the same time it logs on.

gmail loads in the new window, but when I click Calendar or Documents
in the upper left corner of the page, links open in parent window in
tabs.

I want to open in the same window (with Gmail) in the tabs.
<code>
function openNewWindow(el, name)
{
var wnd = window.open('', typeof name != 'undefined' ? name : '',
'menubar=yes,toolbar=yes,location=yes,directories=no,status=yes,scrollbars=yes,resizable=yes');

var komunikat = "Proszê czekaæ, trwa ³adowanie...";
var html = said:
html += "</body></html>";

wnd.parent = wnd;
wnd.focus();
wnd.document.open();

wnd.document.write(html);

wnd.document.close();

return true;
}
</code>
 
S

SAM

Le 9/11/09 12:30 PM, jasiu86 a écrit :
welcome,

I have this problem:
I open a new window in the frame that redirects the user to the page
with Gmail, and at the same time it logs on.

<iframe target="self" ...

But ...
gmail loads in the new window, but when I click Calendar or Documents
in the upper left corner of the page, links open in parent window in
tabs.

That is certainly a feature of gmail
in JS if(self!=top) top.location=self.location;
or in HTML <base target="_top">

They do use something like here in JS,
see one of the last script of gmail's page
They do use quite exactly that JS code on mail.google.com/mail/blah...
I'm surprise that you need to click on Calendar, gmail would have to be
opened in the main window.

What does that do when you open a "normal" page ?
 
J

jasiu86

Le 9/11/09 12:30 PM, jasiu86 a écrit :



<iframe target="self" ...

it doesn't work. perhaps because gmail redirect on self page. I guess.
But ...


That is certainly a feature of gmail
in JS if(self!=top) top.location=self.location;
or in HTML <base target="_top">

They do use something like here in JS,
see one of the last script of gmail's page
They do use quite exactly that JS code on mail.google.com/mail/blah...
I know about this ;]

I'm surprise that you need to click on Calendar, gmail would have to be
opened in the main window.

but when I open Calendar normally (not wnd.open) in browser, Calendar
open in new tab in the same window.
I want the same result.
What does that do when you open a "normal" page ?
The normal page open in iframe (without redirect).

tg
 
S

SAM

Le 9/11/09 4:55 PM, jasiu86 a écrit :
it doesn't work. perhaps because gmail redirect on self page. I guess.

Not surprised.

I think gmail "redirects" itself in mother (or grand mother) window.
Calendar is another application than gmail so it's normal that it's been
opened in a new window (in a tab if this option was chosen in the
navigator).

I mean that normally gmail would have been redisplayed in the main
window (without clicking somewhere).
but when I open Calendar normally (not wnd.open) in browser, Calendar
open in new tab in the same window.

A "tab" *IS* a window.
Are there tabs in you iframe ? No.
So don't expect that Calendar called from gmail will open in same
window. (except if Google offers this feature in some preference
somewhere I didn't find).
I want the same result.

Not possible.
(in an iframe)

Perhaps using frames ?
with a lot of work I imagine.
 
D

Dr J R Stockton

In comp.lang.javascript message <2674651d-5843-4479-b9ab-a29a3d80bc2c@z2
4g2000yqb.googlegroups.com>, Fri, 11 Sep 2009 03:30:48, jasiu86
var wnd = window.open('', typeof name != 'undefined' ? name : '',

var wnd = window.open('', name || '', // ??

typeof name == 'string' // ??

It's a good idea to read the newsgroup c.l.j and its FAQ. See below.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top