How To Force A Child Window To Open In Its Frame Set

Jul 23, 2005

How do I force a window, pened alone, to be displayed in its frame set?

tried this:

if (parent.location.href == self.location.href) {
window.location.href = '../'
}

the problem is that the original page is replaced by the main.htm page (the
default page for the 'main' frame)., because the open event of the menu page
calls for the main.htm to be loaded. Is there a way that I could pass a page name as an argument to the index page at all? Something like
window.location.href='index.html?Loc=IT_Study___In formation.htm'

View 3 Replies


ADVERTISEMENT

Child Window Close Event - Opening Another Link In A Separate Window Using Window.open()

Jan 29, 2010

I have a HTML and I am opening another link in a separate window using window.open() . The child window is something like 'http://yahoo.com' which is out side html. I need to refresh the parent window when the child window is closed.

View 4 Replies View Related

Force A Link To Open A Popup Window?

Apr 6, 2011

I'm having issues with links on my intranet pages that navigate outside of my intranet to other intranets hosted in the same server farm. When I click the links they just do nothing. Links within my intranet site work fine. Is there any kind person here that is capable of pointing me in the direction of resources to force a popup using javascript and making it navigate to the desired link?

View 6 Replies View Related

Closing HTML Window From Child Frame

Dec 12, 2006

I'm trying to create an HTML page that contains two frames.
The bottom frame should simply be some website, but the top frame needs
to have a close link to kill the window. I tried calling
'document.window.close()' from the child frame, but without success. I
then tried putting the 'close()' call in the parent page and calling it
from the child, but still without success. Code:

View 1 Replies View Related

Force Browser Window To Open Full Screen?

Jul 21, 2010

I have an emagazine i want to add to my website, the probelm is when it opens in a browser you have to sroll down the page, to view it all, what i was wondering is, is it possibe to create a link that when somebody selects to view the magazine it forces the browser to openin full screen mode so that it fits niely on the screen without the toolbars and evertything taking up half the page.

View 4 Replies View Related

Top.close Closes The Window Before Responding To Alert In Child Frame

Dec 20, 2005

I am encountering a problem where I have a window and there are three
frames, one in the left, right and in the bottom. The bottom most frame has
common submit buttons. There are several tabs in left frame. Each one loads
a different form on the right frame. After fetching the contents of the form
from user, I am validating the text fields in the form using onChange() event
handler. After entering the text value in the textbox, if I press Submit
directly, the "Submit" as well as the validation routine happens concurrently.
Only at the end of validation, the field is marked as dirty. Now, if field is not
marked dirty, the Submit function will close the window without actually
submitting as nothing was changed. So when an invalid value is entered and
the Submit is pressed directly, an alert pops up temporarily but the close()
call from the parent frame immediately closes the alert window before user
can respond. This problem does not occur in IE as in IE, unless the alert
window is responded, the close() call cannot close the alert window. Code:

View 7 Replies View Related

Child Pop Up Race Condition Using Window.open Need To Detect Window.onload

Nov 22, 2011

I am trying to pop up a window and then do stuff(set flags) when the content of the new window is done loading. For this I am trying to detect the window.onload of the pop-up child window but so far I am unsuccessful. I believe my problem is that the URL of child window is on different domain, than the one of the opener(parent) so that the window.onload is not being called. Though this may change, at the moment I do not have access to the code for the page I'm opening up in the pop-up. Im pretty new to web development.

[Code]....

View 3 Replies View Related

Child Windows Can Not Access Window.opener When Multiple Child Windows Are Open

Jul 23, 2005

I have a parent window that pushes a new window object onto an Array
with the following code :

OpenChild()
{

//totalNumWindowsCreated is global

totalNumWindowsCreated = totalNumWindowsCreated + 1;
childWnds.push(window.open(link, "child" +
totalNumWindowsCreated,"dependent"));

..
..
..
}

This pops up a new window with every call. In the child window I call
a parent function onbeforeunload, appClose() :

function appClose(){

if (window.opener && !window.opener.closed){
window.opener.CloseChild(getQueryString("application"));
}}

This is in my frameset tag of the child code :

<frameset ... onbeforeUnload='appClose()'>

The window.opener.CloseChild() function is called perfectly when I have
one child window open, but as soon as I create another child window
both of the open child windows don't ever call it. They do both go
into the onbeforeunload appClose() function, but do not call the
window.opener.CloseChild() function inside of this routine.

Anyone have any ideas why when I have two child windows open I can't
access the window.opener functions?

I have tried taking each new window out of the array and used the
following code in CloseChild() :

CloseChild()
{

//win and totalNumWindowsCreated are both global

totalNumWindowsCreated = totalNumWindowsCreated + 1;
var win = window.open(link, "child" +
totalNumWindowsCreated,"dependent");

..
..
..
}

View 1 Replies View Related

Frame - Window.open() In Netscape

Jul 20, 2005

I have a page with 4 frames in it. If I click on a button in the 4th frame, a new window has to be opened and the value of the listbox in the 3rd frame hoas to be passed ....
My code works fine in IE, but doesn't in Netscape .....

First, the value of the listbox .... I try to get it with
parent.frame3.form.listbox.value ... But an alert of this (as a test)
does nothing .... I tried several combinations like parent.frames[2]
and parent.frames[frame3] but nothing happens ...

Another problem is that the frame4 is blanked ... strangely enough ...
I'm just doing window.open('blablabla');

View 2 Replies View Related

Window.open Location.href Frame

Jul 20, 2005

I have a page of 2 frame:

menu (menu.php)
corpo (corpo.php)

In menu.php i have:

View 4 Replies View Related

Link To Close Window And Open Frame?

Mar 1, 2009

I have a page with 3 iframes it has a link to open up a page and when the user clicks on a link on that page - I want the new page to close and the link to open in the second iframe on the original page

View 4 Replies View Related

How To Keep Child Window Open When Parent Closes?

Jul 23, 2005

I have a closed box system which opens an html page. The page closes by the
system. I have access to the html page. I added code to open a child window
from this page. However when the parent window closes, the child closes
too. Is there a way to keep the child window open? Yes keep it orphaned.

View 2 Replies View Related

Open Window Problem From Flash Inside A Frame

Mar 24, 2006

Hi, I have a curius problem, I hava a flash in a html page. In flash I have a button to open a pop up with this code:

View 1 Replies View Related

JQuery :: Use A Parent-frame - Objected To Make Child-frame AJAX?

Aug 26, 2011

I have a domain: example.com; which is the parent.And a subdomain: api.example.com; which page 'receiver.html' is being loaded in an iframe, child of parent. Both pages set document.domain = example.com.

I'm trying to adapt this code:[url] but Idon't want to load jQuery from the <iframe> again but I need to have the method $.ajax() working from the <iframe> otherwise it would be a cross-domain request and the browser would abort it. I tried ingenuously to set via $('iframe')[0].contentWindow.$.ajax = $.ajax() and I just got a shortcut to the parent page jQuery method. I also tried to "clone" it using $.expand (true...) but the method doesn't work for me; probably because of the complexity of the objected I'm trying to clone. So is there a way for me to use jQuery to have only a $.ajax() method in the <iframe> ? I've thought even about creating a XHR in the child-iframe and then use that in the $.ajaxSetup ({xhr: THATNEWXHR}) but I couldn't do it. I mean, I want to use the XHR factory from jQuery (which has fallbacks for IE, etc) but it has to be created from the iframe-child.

Maybe there is other way to make the AJAX call come from the child-iframe.

If you're wondering "why don't you load jQuery from <script> in the child-iframe", there is a reason... As I'm using jQuery plugins + my own custom javascripts + other independent scripts I created a compiler which minifies each file and bundle them in one. The advantage of this is the reduction of HTTP requests. So "why don't you load that bundle inside the child-iframe?", because it's ugly and Twitter doesn't... Yeah, I like to take Twitter as a reference and I think if they were able to make it so can I;

I got to work in most browsers except IE and Operaby doing it with pure javascript.

I'm "attaching" the code for you guys to test. If you open it with Chrome, Safari or Firefox you will receive 2 alerts one with the return of $.get() and another with the return of a request made via XMLHttpsRequest object. Otherwise (if you open it with IE or Opera) you'll get 'undefined' in the first alert but the real return in the second.

This is the example.com/index.htm:

View 4 Replies View Related

Open New Window From Child Window?

Oct 4, 2010

This is it- when i create the button code with HTML without script language on the page the button works well but when javascript code added is added to the page the button disappears. If i create the button with javascript it appears but does not open the next window.

View 1 Replies View Related

Way To Open New Window From Child Window

Oct 9, 2010

[Code]....

code to make this button work? In the parent window when 2 is input in the textbox and 'OK' button clicked, the second window opens with 2 textbox and 'SUBMIT' button. If 'SUBMIT' button is clicked in the child window i want it to open the new window.

View 1 Replies View Related

Breaking Out Of Parent Frame If Child Frame Changes URL

Jul 19, 2006

I have a parent document that has a frameset with two frames in it. The first frame is a "header" that runs across the top of the site, and never changes. The second frame contains the "content" of the site. Essentially, I am trying to figure out how to prevent the header appearing above external sites when the user clicks an external link in the "content" frame.

Every time the content frame changes to a new URL, I would like the check that URL and determine if the content frame is changing to an external URL (i.e. different domain in URL) or to an internal link (same domain in URL). If the content is changing to an external link, I want to break out of the frame and just load that external link in the top most document.

I would like all of my javascript to be in the parent document, not spread throughout the individual pages of the site. I was trying to approach this by setting the onunload event handler of the content frame, but I am left with a couple of specific questions:
1. In handling an unload event, can you determine the next URL that the document is loading? Code:

View 6 Replies View Related

Open The Frame Inside The Main Frame

Jan 10, 2011

I have a little problem, I structure my site with a main page index.html with a frame in the central whit name CENTRALE, so every other page I will open within this frame. Now I need to have a direct link to these internal pages, give an example I wish it were possible to go to the page clothing giving a direct link to that section of the site type www.indirizzo.com / clothing.html because the state of things if I take the 'direct address to that page I open only the part inside of the frame, but I wish I would open inside the "main frame, there is a solution in javascrip to overcome this problem?

View 4 Replies View Related

Is It Possible To Have A Link In FF And Force It To Open In IE Or IE-tab?

Oct 18, 2007

At my job we have computers that are set up with restricted rights. Firefox 2 is the default browser (good call), but for some reason a site that the user has to visit is IE only (yeah, wtf).

We have a webpage open with a link to that IE only site, now is there a way to open that link in IE from FF? We have full control over these machines, so we could install batch software or whatever it would take.

View 2 Replies View Related

Force Outside URL To Open In IFrame ?

Mar 9, 2009

I have a simple iFrame which I use to open other websites. However, some websites force themselves to be opened in "parent" windows when links are clicked, or even always. How do I go about avoiding this? I believe there is a way to set my iFrame as "self" or something like this in order for all sites to still only load in iFrames, but I'm not sure how.

View 2 Replies View Related

Force Open Of Mime Type

Jul 23, 2005

Is there a way to force the client to open a particular file type. Currenlty
text files that are opened by the web site are opened inside the browser, I
would like to stop this and have them prompted to open or save the file.

View 2 Replies View Related

Why Can't I Access Child Frame Elements With The Direct Form?

Jul 20, 2005

I have a document that contains a child frame with name/id = "help_frame".
From Javascript in the top level document I can access the child frame's
elements using:

var elem = document.frames.help_frame.document.getElementById ("chkSynonym");

but if I try:

var elem = document.frames.help_frame.document.chkSynonym;

the result is 'undefined'. What is wrong with my syntax?

View 1 Replies View Related

Define A Child Of A Frame - What's The Object Opposite Of Parent

Apr 24, 2010

How do I define a child of a frame? What's the opposite of parent.document?

View 1 Replies View Related

Insert Script Tag Or Code While Child Frame Loads?

Apr 28, 2010

I have a frameset page that creates several subframes. Does anyone know how to inject the script tag or some js code into the child window before loading of the child frame begins? The reason is to make the pages back-compatible with another system without changing a lot of code. If I can inject the script before the page loads, then it will handle the compatibility issues.

I've successfully injected the code into the child frames by using:
frames.childName.window.eval.call(frames.child_name.window, myCode);

And the functions are available to the child frame after it loads, but the code needs to be available to the child frame before/while it is loading.

[Code]...

View 2 Replies View Related

Code - Void Window.open - Link Would Open In The Same Window?

Feb 7, 2009

I have this piece of code which is opening link in new window:

How to change this code so link would open in the same window?

Probably I should change this part: javascript:void window.open

View 1 Replies View Related

Force Maximised Window?

Nov 2, 2005

Can I use JavaScript to force a maximised window ?

View 17 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved