Automatic Frame Popups

Jul 2, 2003

Is there a script that on loading a certain page will check to see if its in a frameset, and if it isn't in said frameset to make it be in that frameset.

For example, I have a popup that has a navigation frame at the top and a content frame at hte bottom. I want to be able to have links link to it (the popup, from wherever) that can open any of the pages inside this frameset, without making a separate frameset for each page of content. If I could get it to open the content page, and the content page open itself into the frameset, or even built itself its own frameset, that would be neato keen.

View 5 Replies


ADVERTISEMENT

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

Go Back History Button On Top Frame That Affects Main Frame?

Oct 15, 2001

Im trying to make a back button that reloads the previous page the user was at.
The back button will be on a small top frame and the page that needs to be controlled will be in the main frame.

The top frame is just a navigation system, and all pages will be loaded in the main frame.
Im trying to use this Code:

<FORM>
<INPUT TYPE="button"
NAME="back"
VALUE="BACK"
onClick="history.go(-1)">
</FORM>

Does anyone know how I could accoplish the desired result using this code, or any other code? And what about a foreward button?

View 2 Replies View Related

Click On 1 Of The 3 Frame Options The Frame Changes Showing A Preview?

Jul 20, 2010

I want to have a main image in place and when you click on 1 of the 3 frame options the frame changes showing a preview. Also I would like the add to cart button change its code to add the correct item as well.

View 2 Replies View Related

PASSING Data From One Frame To Another Frame In A Frameset

Aug 30, 2010

i need to pass the data in the textfields from the left frame to the textfields in the right frame of my frameset. (ex: dslnum of frame1 will be pass to txtDSLTN of frame2)[URL]

View 19 Replies View Related

Change Frame Url With Clicking Link In Another Frame

May 22, 2011

I have two frames (frameset, let's call it frame1 and frame2). Frame1 has links..., and frame2. When some link in frame1 is clicked, it must be changed content of the frame2. Here's example: click. How to do that? (I don't see any javascript code)

View 2 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

Print Contents Of One Frame From Another Frame?

Sep 8, 2010

I have a frameset with two frames; topFrame and mainFrame. I have code in topFrame and wish to print the contents of mainFrame. The code that I have used has worked for many years and still works on my localhost Apache Server. However, it has now "stopped" working. When I press the button in topFrame it prints the contents of topFrame The code that I am using is

Code:
window.parent.mainFrame.focus()
window.print

I have tried to replace the first line with..

[Code]...

View 1 Replies View Related

Send Variables From Frame To Frame?

May 13, 2009

I use dreamweaver mx html editor to make web sites. I think I know enough Html to get by. My new site uses a frame set so the head and controller don't change reload or move. This works nice, now all I have to do to make a new page is make the content page. But my problem is if I send out a link for someone to look at, it only loads the content page and not the frame set. I thought I could use javascript to determine if the frame set is present and if not load it. But I can't seem to find a way to sent variables from one frame to another. Also if a user clicks a link I would like my flash controller to reflect it.

[Code]...

View 1 Replies View Related

Refreshing Bottom Frame From Top Frame

Aug 9, 2004

I need to know how to refresh a bottom frame TO a specific dynamic URL from my top frame (meaning the code has to be in the top frame) say every 5 seconds. The top frame will be a php file as I need DB values. But I believe the frame thing is done via javascript. This ain't working so far, it only loads the first URL at not the rest. Is there the ability to refresh to a specific url in a target frame. Code:

View 5 Replies View Related

Frame.contentWindow Vs Frame.contentDocument?

Feb 19, 2009

One more question about manipulating iframes. In a script I've looked through to investigate AJAX file uploads, there is this technique for accessing the contents of an iframe:

Code:
if(frame.contentWindow)
{
var thebody = frame.contentWindow.document.body;
}else if(frame.contentDocument)
{
var thebody = frame.contentDocument.document.body;
}

I haven't been able to find much info on contentWindow and contentDocument. In fact, other sources I've found talk only about using contentWindow to access an iframe's contents, ignoring contentDocument completely. What is the difference between the two, and what browsers is the contentDocument check targeting? Any modern browsers, or is this a backward compatibility thing?

View 8 Replies View Related

Popups

Nov 20, 2005

I need when a page is accessed to launch 2 popups then close itself. Can anyone help? All help is very much appreciated. One popup is going to be a regular page and an add then for other popup if any ones curious.

View 1 Replies View Related

Certificates And Popups

Jul 23, 2005

Just wondering, if one provides/uses a certificate on the website, does that
solve the problem with blocked popups?

I am building an application in PHP/JavaScript that will be used only on our
clients' computers, but new clients are added frequently.....

View 2 Replies View Related

Popups And Resizing

Jul 23, 2005

I am using a popup window to show pictures. Each time the user clicks on
a thumbnail in the mail HTML page, the popup either appears or reloads a
new picture.

Some pictures are portrait, and some are landscape. I build the popup
html dynamically. How can I a) resize the popup window to fit the image,
and b) pop it to the forefront once the new picture is loaded?

View 8 Replies View Related

Can't Nest Popups..

Dec 11, 2006

I am trying to get a fairly complex database form set up..at various
stages I need to open popups to edit subsections, then close them..

Now this all works fine from the main screen, I can open a popup using
window.open() and it spawns in a new browser or tab, do my stuff, and
exit to the main screen..

However if I try to open another popup in the child popup, and return to
THAT with a window close in the grandchild, firstly it never opens in a
new window, but in the child window, and secondly it closes itself and
returns not to the child window but to the parent window.

I have googled till I am blue in the face but no joy..no one seems to
have a snap solution for this one.

I suspect I need to use the window object that window.open returns,,but
have no idea how..?

View 2 Replies View Related

Popups And Browsers

Nov 17, 2006

On my site, I would like to open a centred pop-up with thumbnails. Clicking on them you get the full image with navigation arrows leading to new photos, etc.

I want to have pop-up dimensions suited to what's in the page and if the photo is vertical or horizontal.

Now, the code here under works well with FF2.0 and NS 8.0, but IE6 and Opera 9 just make the window.close() in func_aperta() and closes the pop-up.

What's wrong? Any ideas? Code:

View 5 Replies View Related

Multiple Popups

Oct 11, 2005

i'm working on my band's website and I want to be able to make multiple popups on one page. as in, the links you press will all come up in DIFFERENT popup (barless) windows. but no matter what i try, no matter what link you press they all come up in the same popup window. im hoping to make all the links come up in different sized seperate windows! anyone know how to do this?

View 7 Replies View Related

Popups Not Working In IE8?

Oct 21, 2011

For some reason, in IE8, on product pages (Example) of my ecommerce site, the 'Size Chart' and 'Email to a Friend' popups don't work, and the product image lightbox won't work eitherbrowser I have tested in, including IE7. It seems to only be IE8 that is having this problem.Upon looking at the page source, one thing I have noticed that both the 'Size Chart' and 'Email to a Friend' buttons have in common, is that the popups seem (I'm far from an expert) to be 'triggered' by a span element (class="more") within the HTML. For example:

<div class="row ">
<label >Size: </label>
<strong class="fl"><select name="size" id="size" onchange="checkstock(this.value)"><option

[code]....

View 6 Replies View Related

Javascript Popups

Feb 25, 2004

I have a quick question about javascript popups...

At the moment I have the function

function openWindow(page,width,height)
{
window.open(page,"my_new_window","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=" + width + ", height=" + height)
}

Which is opened by the link

<a href="java_script_:;" onClick="openWindow('popups/popup_template.htm',&#39420;',&#39640;')">

This works fine and I get the popup just how I want it.

However, When that popup loses focus (IE the user clicks on another page) that popup goes behind all the other open pages. Then If I open another popup with that one still open it stays in the background.

I know that I can use

Onclick="self.close()" and OnBLUR="self.close()"
to close the popup when the user clicks, but I need them to be able to click in the popup.

Does anyone know an OnLoad fucttion or method that will bring the popup to the front when the user opens another window.

OR

Is there a better way of doing this.

View 2 Replies View Related

Page Popups Because Of JS

Jan 14, 2005

There is a webpage (of another website) "page A" (a registration form) that I have to use as a popunder on my website.

However, due to the code for the form validation (email & other entries) on Page A, the page does NOT remain as a popunder, but popups above my actual website's main page....

Is it because of this attribute in the body tag?
<body OnLoad="document.form1.email.focus();">

If so, what counter can I use to beat it poping up above the main index page?
PS: Cannot make changes to PAGE A, just my own Index page....

View 19 Replies View Related

Using Popups For Confirmation

Jun 10, 2006

I have noticed some websites use a popup system for confirmation... I know that hotmail uses a similar feature for adding file attachments. So I was wondering how exactly a website would have that feature work.

What I need to know is how to make a popup that...

a) Popups up in the middle of the screen and ALWAYS popups up (the popup blocker in IE wont disable it)

b) A Popup window that cannot be ignored. Therefore the user cannot complete any other actions on the webpage (the page that is displayed on that particular browser instance window). If the user attempts to click outside of the box then it will not allow them to.

c) Once the popup window has been completed (the user clicked the ok button to confirm the message) then the window will disapear and the user will be focussed back onto the original window where he/she was browsing on.

Most of the stuff is simple javascript. (opener.focus() and self.close()) but when it comes down to making popups be the center of control, I am lost.

View 3 Replies View Related

Unblockable Popups?

Jul 19, 2006

I'm doing a website at the moment for a shooting club which is opening in a few weeks time. I'd like to have a popup on the home page which appears on a user's first visit to tell them about the opening day. I have the cookie sorted to detect whether they've visited before or not, but how do I make a popup which won't get blocked by all today's browsers and popup blockers? Is there a way that genuine useful popups can be verified and not blocked?

View 2 Replies View Related

PopUps Display Only Once

Apr 27, 2011

I have a Jscript popup which comes after 5-6 seconds of my page load.

This happens for all the pages.

I have tried the following..

This load the popup on load.

Now, i want to make sure that if a user once clicks on cancel, he will not get the popup for rest of the pages also.

But if he opens the pages individually the next time, he will get the pop ups.

So it will be displayed only once after he clicks close and will not come the next time.

View 1 Replies View Related

Popups Relative To Resolution?

Jul 20, 2005

Does anyone know where I can get a script for a pop-up where I can control fixed positioning of a popup based on browser resolution?

two res's: 800 x 600 and 1024 x 768 ....

View 2 Replies View Related

Multiple JS Hover Popups ?

Jan 21, 2010

I'm trying to have an ordered list, each item with its own image. Then, I'm trying to use JS so that a different popup is generated for each image.

Currently, I'm using CSS classes to define the appropriate popup image, and this seems to work fine as I can see the popup contents in Dreamweaver.

I think the issue is the 'getElementById' thingy. As whichever image I hover over, it always pulls the first hidden popup.

JS

Code:

HTML

Code:

CSS

Code:

Is there a way form me to also pull the class that is referenced in the html, so that the appropriate popup is generated?

I don't think I'm using the code highlighting properly and I intended to link to the page, so you could see what I'm talking about, but apparently that's not allowed.?

View 2 Replies View Related







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