Update Parent Iframe Size Without Updating Inner Frame?

May 3, 2009

I have a web page. In that there is a toggle button to show or hide advanced search options. Below that there is a "IFrame A"(Table). IFrame A conatins "IFrame B" (Table Contents). Based on the toggle switch status, i want to update "IFrame A" size without refreshing the "IFrame B".Is it possible to do so ? Can you give me some example or point to some tutorial .

View 4 Replies


ADVERTISEMENT

Set Var In Parent Frame From Iframe

Jan 19, 2007

I have a var in the parent frame called imageon.


Inside my iframe when someone clicks on a thumbnail, I want to change the value of imageon in the parent window.

Here is what I am doing


//I will hardcode the #4 here for this example
i_imageon =4;

/*
here I have to tell my parent page that they clicked on a thumbnail so my parent page knows where to pick up when they start hitting the next or prev arrows
*/
parent.document.imageon = i_imageon;


This is not working. Any ideas? Onclick, I can alert i_imageon and it shows what I need. The problem is, it is not setting the var imageon to this value in my parent frame.

View 3 Replies View Related

Passing Input Values From Parent Frame To Iframe Not Working In Firefox

Mar 5, 2009

To sum up this issue, I have a parent page, which holds some values in hidden input fields passed to them from the url. On this page, I have an iframe with a form in it, to which I want to pass values from these hidden fields to be displayed for the user in the iframe form. In IE, it works. To accomplish this, im just simply doing a <body onload="GetInput()">. The GetInput function does the following, but for about 10 fields:

Fnamefield=document.getElementById('firstname').value = parent.document.getElementById('firstname').value; Thats it. Once the page loads, i see my values. In firefox it does not work. I know the hidden fields are getting their values, but thats as far as it makes it. I have tried calling the GetInput function after the form is written out and not in the body tag, which still works for IE, but not FF.

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

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

Updating Url To Reflect Frame Location?

Jul 30, 2011

I'm currently developing a new website and I'm having a little bit of trouble.

I have a main page (index.php) and I've got a frameset inside of it, like this:

HTML Code:
<frameset cols="*,200">
<frame src="frame1.php" noresize="noresize" />
<frame src="music.php" id="mp3player"/>
</frameset>

The frame on the right is an mp3 player which is permanently there, and the frame on the left fills the rest of the page with the actual website. The user can navigate around the whole website just fine without interrupting their music.

The only problem I've got is that I can't seem to update the browser url to reflect the url of the first frame, I can't even update the hash. If I modify the hash of the index.php through any of the following means:

Code:
parent.location.hash = "mynewhash";
location.hash = "mynewhash";
window.location.href = "index.php#mynewhash";
location.href = "index.php#mynewhash"

Using any of those to update the hash causes index.php to reload the frames inside.

Is there anything I can do to have index.php reflect the location of frame1, or atleast have index.php in a way that I can bookmark a page?

View 1 Replies View Related

ERROR: Updating Database Data, Then Update Page Without Reloading?

May 4, 2011

I have a problem, I am by no means new to PHP/Javascript but am finding an error that I cannot ridicule how to stop.Ok Ill try and explain it in simple terms:I have two divs, div1 and div2,In div1 there are links whitch are fetched from the databaseIn div2, content from links href ? in div1 is collected through AJAX.No I have a php preg_replace function that replaces it to look like <a href='#' onclick=\"showTopic(0,$char,'$1');\">$1</a> Now when you click this, it inserts into the "tpm" table in the database,(this table holds the links for div1) But it will not update the links unless i refresh the page? I would like to knoe how to update the links in div1 without refreshing, because refreshing = going back to the start of the code i am working on.

View 3 Replies View Related

How To Update One DIV Frame From Another?

Feb 1, 2005

I have two DIV frames...

<body>
<div id="leftcol"><?php include("navL.html"); ?></div>
<div id="content"><?php include("content.php"); ?></div>
</body>

and in the leftcol DIV frame, I have navL.html file loaded.

This is the content of the navL.html file...

HTML Code:
<script type="text/javascript">
<!--

function load(arg)
{
alert(arg);
document.getElementByID("content").src = arg + ".html";
}

//-->
</script>

<a href="#" onClick="javascript:load('test1');">test1</a>
<BR>

<a href="#" onClick="javascript:load('test2');">test2</a>
In there I have two links which I want to use to update the content DIV frame with either test1.html or test2.html depending on the link that is clicked, but somehow it is not working..

View 1 Replies View Related

Manipulating Frame Size

Aug 8, 2000

I'm attempting to make a div hidden upon an image click, and it's not working.

Here's the code:

<script language="JavaScript" type="text/javascript">
      function ToggleDisplay(id)
      {
       // alert(id);
        var elem = document.getElementById(id);
        if (elem)
        {
          if (elem.style.display != 'block')
          {
            elem.style.display = 'block'
            elem.style.visibility = 'visible'
          }
          else
          {
            elem.style.display = 'none'
            elem.style.visibility = 'hidden'
          }
        }
      }
    </script>
    
    <style type="text/css">
        .header { font-size: larger; font-weight: bold; cursor: hand; cursor:pointer;
                   background-color:#cccccc; font-family: Verdana; }
        .details { display:none; visibility:hidden; background-color:#eeeeee;
                   font-family: Verdana; }
    </style>  

Here's the div:

<div id='div<%# DataBinder.Eval(Container.DataItem,"City").ToString() %>' class="details">

Any ideas on why this isn't working?  I've tested in the JS code to make sure it was getting the right ID so that part is set.

View 7 Replies View Related

Accessing The Parent Frame?

Nov 11, 2010

I'm using an iframe and I have this code in the src file for that iframe.

HTML Code:
if (parent.location == "http://domain.com/store.html"){
document.write("********************************");
}

[Code]....

I've tried self.parent.location, I've tried parent.window.location, I've tried parent.location.href, none of it works.

View 3 Replies View Related

JQuery :: Cannot Trigger Event From Parent Iframe Into Child Iframe?

Oct 25, 2010

Have this in parent document:

function ResizeDocument(...) {
$("iframe"
).each(function
(){ $(this
.contentWindow.document).trigger('customresize'
,null
);});

[Code]...

View 2 Replies View Related

Getting Parent.[frame Name].location Has No Properties

Aug 25, 2006

This is not an IFrame. The frame exists. This is code for a Notes Client. Should be the same as for a browser? Here is my code:

document.bgColor = "blue";
document.frames[0].location =
"/IC.nsf/Get%20and%20Compare%20URLs?OpenView"

OR

document.bgColor = "blue";
document.Frame2.location =
"/IC.nsf/Get%20and%20Compare%20URLs?OpenView"

View 1 Replies View Related

Get Parent Window Title And Url From Frame?

Apr 7, 2010

How do I get the parent window title and url in the iframe? JS code being in the iframe, not parent window.

View 1 Replies View Related

Scroll To Parent Frame When Can't Control It?

Nov 4, 2011

I have searched the net extensively for a js link code that will scroll to the top of the parent frame.So, link is in iframe within a parent frame that I can't control. Therefore I cannot place any 'a name' attribute in any link in the parent frame. But would like to scroll to the top once the button in my iframe is clicked.I have used most scroll, document scroll to parent etc js functions but none of them scroll to top of parent page and some require a name to be placed in parentthis is my simple link<a href="#">go to top</a>

View 7 Replies View Related

How To Update A Iframe Through A Hidden Iframe

Oct 28, 2005

How would i go abouts putting a javascript code into a hidden iframe and then have it update new messages to another frame if there is a new message?

By message i mean it checks the database for a new message ( this is for a chat )
Its the javascript im not sure how to set up... If someone could point me in the right direction thatd be great.

View 1 Replies View Related

JQuery :: Use BlockUI From Within An Iframe To Block The Parent Iframe

Aug 18, 2009

I am loading a collection of frames as follows (from jsp source, so ignore <%= %> blocks):

<html>
<frameset name="MNGM_OUTER" rows="50,*,20" framespacing=0
frameborder=0 border=0>
<frame name="MNGM_TOP" src="control/top.jsp" scrolling=no

[Code].....

View 1 Replies View Related

Send Refresh Command From Pop-up To Parent Frame?

Feb 25, 2009

I want to send a refresh command from my pop-up screen to a i frame in the parent document.

I have written the following script code...

View 4 Replies View Related

Redirect Page To Open In Parent Frame

Apr 5, 2007

What I'm trying to do is make it so when a visitor or a search engine tries to view a page outside of the parent frame it reloads that particular page inside the parent frame. All the scripts I've tried WILL redirect the visitor back to the parent frame, but NONE of them will then load the previously viewed page into the 'main' frame. I don't want visitors to have to navigate through the site to find the particular page they were viewing.

I have seen this script before but I can't remember which site was using it, also without a redirection to the frames the site won't display properly and navigation would be difficult. Code:

View 1 Replies View Related

Ajax : Add / Update In Child Page , Parent?

Mar 18, 2009

I have a page [parent], on it is a link to a popup [child] that opens up a form. On the [parent] page is a list of entries from the table in the DB.

So basically once a form is submitted on the [child] page, I want the list of entries on the [parent] page to be refreshed

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

Refresh Iframe's Parent From Within Iframe In Https?

Aug 11, 2011

I have a page A and inside it I have an iframe B. B points to another php file that shows a form (so basically in the iframe we see a form). When I submit the form, I call to another page C that verifies the fields of the form and if they are ok I redirect to page X, if not I redirect to page Y. The problem is that I see page X and Y inside the iframe, and I want to see them in the parent page.

View 1 Replies View Related

Posting Parent And Iframe From Parent?

Aug 27, 2010

I have a page which has a form and also one iframe in the same. there is a button on the parent form.when the button is clicked, i am submitting the iframe and parent both. forms are getting submitted. but when i do print_r for iframe values, it is blank

[Code]...

View 1 Replies View Related

Value Of .src Does Not Update Within Iframe

May 25, 2006

I am trying to track links that are clicked on an "external" page that
resides within my iframe.

I am able get the INITIAL value of the iframe .src, however this value
does not update once the content has been updated by clicking the
external link. It keeps the original value of .src..

View 2 Replies View Related

Update Iframe

Feb 26, 2007

Is it possible to refresh a iframe when a user changes the value of a select box. I want a user to be able to change a month and year option group and onchange it should refresh an iframe with a small calender in it.

View 1 Replies View Related

Iframe Order Switching From Another Frame?

Sep 3, 2010

I have a page that consists of 3 frames.In the left frame there are 2 stacked iframes. I would like to change which iframe is on top from the center frame.I've spent the entire morning trying to find an answer on the internet.

View 1 Replies View Related

How To Make Javascript Update IFRAME SRC?

Jul 20, 2005

How can I make an onchange event update the src for an IFRAME? I would like
to do it without reloading the page, is this possible?

View 3 Replies View Related







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