Sending Out Of Iframe And Catching In Parent?

Apr 1, 2009

I have a page contained in an iframe. The page contained in the iframe shows videos all the time.Each video has an id that changes when a new video is played.I need to be able to catch this changing id in the page that has the iframe (the parent page) and that is hosted in a different server from the contained page.The only languages that can be used in the contained page are javascript, ajax and jquery
In the parent page you can use these languages + php.

I'm not posting the contained page code just because, believe me, it's humongous,full of variables and functions from other files and modules.The only thing needed there is a variable, myid, that stores the new id when a new video is played.Then I have to post, send, throw ... etc. myid and after that catch it in the parent page, remembering that myid's value changes when a new video is played and that.I have to get that new value at all times.I have to get the value of the playing video id to do things like changing the background of the page depending on the video played or showing a webpage depending on the video played ... and so on.

View 2 Replies


ADVERTISEMENT

Sending A Value To Parent Window

Oct 2, 2004

On the main window, you click a link and it pops up another window, where you can do some stuff, and ultimatly you get a variable that has some value to it. Now, when the user clicks "All Done", I want that variable value to be become the value of a hidden input "attachments" back in the main window.

Code:

<script language="javascript">
function sendUploads() {
var newValue = &#392;'
parent.document.addform.attachments.value = newValue;
}
</script>

The main window's form is called "addform" and the hidden input is called "attachments".

View 1 Replies View Related

Sending Information From Popup To Parent

Jul 5, 2011

I want to send data from a form on a popup to a form on its parent page. I have checked several approaches, but none of them is working with me. In the end, I've just tried to use an existing example from the web (http://www.plus2net.com/javascript_t...dow-child3.php) but even this is not working locally after copying the code from there, while it's working well when I try it directly on the page.

I have absolutely no clue what I am doing wrong. But after this experience I have my doubts, that it's not about the code. EDIT: I just found out, that this problem is specific for chrome, if I try this page on the web, it's working on chrome and firefox. But if I try it locally, it's just working on firefox. Does anybody have an idea how this could happen?

View 3 Replies View Related

Sending Many Values From Child To Parent Window?

Mar 16, 2010

I need to send possibly many values from a popup child window to a parent window. Say:

List of Fruit:

Apple [Add]
Banana [Add]

Each click of add adds the fruit into a input text box, on the parent page. [URL]I could make a form for every fruit and send it back this way. It is troublesome, but can be done.

View 1 Replies View Related

Sending An Image Outside An Iframe?

Sep 18, 2011

I posted this in a CSS forum, and was instructed that this may take some elaborate javascript to accomplish.

I have a website that a lot of people iframe, and I want to let them still be able to iframe my site (no framebreaker used), but I would like to show an image on the original page that is iframing my page. Is there a way I can make an image show on the page that is iframing my site, not over my iframe?

Example, a sites homepage (that I have no control over) has part of my page in a 300x300 iframe. Can I make an image that shows outside of the 300x300 area of the site that my page is framed in?

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

Sending Data To Server With Iframe

Apr 5, 2006

Do you know a dynamic way to send 10kb of text or more using an iframe?

I tried to do that with by creating, in javascript, a dynamic iframe,
then create a form into this iframe and put the data in a textarea and
then call a sumbit(). Code:

View 1 Replies View Related

Sending Variable To Page From IFrame?

Jul 24, 2011

I'm trying to make a cross domain iframe and want the iframe to dynamic resize the height. I have read that this is not possible, but if I own both domains I thought that I in my cross domian could make an variable which tells the height of the page and then send it via the iFrame to my page. My crossdomain page has a javasacript like this:

Code JavaScript:
var pageHeight = document.getElementById("container").clientHeight;

And my page would get the page like this:

Code HTML4Strict:
<iframe src="mypage.com" width="100%" height="The height from my crossdomain" frameborder="0" scrolling="no">

View 1 Replies View Related

Sending Api Data To Iframe Source

Apr 19, 2011

Trying to append data from an API to the frame source; not loading. master page:

[Code]...

i'm kind of dizzy right now since i've tried X different versions...still working on it. the new URL doesnt load i want to get the stud_id from the API and append it to the url that i launch in the iframe

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

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

Iframe Is Not Getting Along With Its Parent?

Mar 3, 2009

seems like my iframe is not getting along with its parent.I have been scratching my head about this and finally have the iframe calling the image in the parent and making it popup on click. HOWEVER I can not make that image draggable which is driving me bonkers.This is the iframe script

Code:

<script type="text/javascript">
$(document).ready(function() {
$("#clickMe_01WC").click(function() {[code].....

I am using jQuery.The user clicks a link in the iframe and it toggles an image which makes it appear in the parent. This image that does appear however is not draggable and I am uncertain on how to go about this.

View 1 Replies View Related

IFrame Parent Object?

Jul 20, 2005

I have an HTML page loaded into an iFrame contained in a DIV tag. From the loaded document how would I reference the DIV object?

View 2 Replies View Related

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

InnerHTML Of Iframe In Parent

Sep 3, 2006

I have a page, with 3 IFRAMEs on it. From one of these IFRAMES, i am trying to append to the content of another IFRAME.

This doesnt work:
top.frames[0].document.getElementByID('chat').innerHTML+= "new content"

any thoughts?

I know I'm referring to the right frame, because

top.frames[0].document.location.href = "someotherpage.html"

does work

View 3 Replies View Related

Getting Value From Child To Parent IFrame?

Feb 4, 2009

I have one page which have two ifrmaes, parent iframe contains no of child iframe. Now oncliking child iframe check box, I have to get that value into parent iframe, I managed to create array of parent iframe but can't get child ifrmae's control. I used like this:
document.getelementbyid("iframeparent1).document.getelementsbyname("Check1")
but it doesn't work.

View 2 Replies View Related

Data Across Iframe And Its Parent

Mar 18, 2005

I need to execute some code after the page loads. So I'm having the code execute in an iframe. Now, the iframe contains JS vars and/or page elements that I need to use in the parent frame. How can I gain access to either of these in the parent?

I've tried all sorts of combos of frames[0].document.getElementById('name').innerHTML and so forth and I just can't seem to gain access to the document in the iframe from the parent.

View 2 Replies View Related

Add Code To Parent From IFrame?

Apr 14, 2011

What I want to be able to do from within an iframe is:
check if
parent.window.document.getElementById("autoloadpop") is null
I guess that would be:
if (parent.window.document.getElementById('autoload') == null) { etc

But then I want to add:
<a href='popup.php' id='autoloadpop' onclick="return hs.htmlExpand(this, { contentId: 'popup', objectType: 'iframe', width: 620, maxHeight: 400} )"></a>
to an existing div with the id 'main-header' in the parent page.
And then make the following call:
parent.window.document.getElementById('autoloadpop').onclick();

View 1 Replies View Related

How To Refresh Parent Iframe

Dec 8, 2011

Normally this would be pretty straight forward, but I've tried a bunch of examples and none of them work.

I am attempting to refresh a menu I have in an iframe. I will explain. I have a index.php page with 3 iframes in it (this is the parent). The top frame is for the site logo, the left frame is the menu (I call it menuframe) and the frame beside that is for the page content (contentframe).

I have the menu with various options, when the user logs in it should refresh and show some addition options (logout, admin area, etc).

The login page appears in the contentframe, once the user logins I want the menuframe to refresh to list these new admin options. I know my php session is working fine because if I manually refresh the menuframe it shows the items.

[Code]...

View 2 Replies View Related

Passing Value From Iframe To Parent?

Mar 2, 2010

what's best way of passing a php variable from an iframe to the parent screen?

View 6 Replies View Related

JQuery :: Use Parent In Iframe Pages?

Nov 2, 2011

I load jQuery.js in a.html.In a.html ,there is a iframe that its src is b.html.I want to use parent.jQuery in b.html.But when I use parent.jQuery.find('.abc').It dose not find the elements with class abc in b.html.It find elements in a.html.The maybe some problem.Because there is a lot of iframes on a.html.So I do not want to load jQuery.js in each iframe.How could I do to use parent jquery in those iframes?

View 1 Replies View Related

JQuery :: Use Object Of Parent In An Iframe?

May 28, 2009

I am developing a web application with full of independent widgets in form of iframes. I would like to avoid embeding jquery (and jQuery UI) in each iframe's head to reduce number of requests and want to use the libs from the parent window instead. In iframes' head I tried the following code:

window.$ = window.content.$;
window.jQuery = window.content.jQuery;

Well it works but naturally as the jquery object belongs to the parent document I can manipulate only the DOM nodes of parent document from the iframe and not the DOM nodes of the iframe itself! I think if I could replace the "document" object of "window.$" with iframe's "document" object it would work!

1) Is "=" copy by value or by reference? If I succeed to replace the "document" object in "window.$", will it be also replaced in "window.content.$"?

View 1 Replies View Related

IFrame Not Talking To Parent Page

Sep 6, 2009

I'm working on a upload script that uses javascript, and a hidden iframe to upload the files. It all works up until the iframe finishes and needs to send the javascript function call back to the parent page, nothing happens, when it should hide the upload progress bar. I've searched and searched for the answer, along with trying different alternative to window.top.window, such as window.top, parent, and parent.document and so far nothing has worked, I've even tried the onLoad on the iframe with no success.

Parent Page function:
function stopUpload(success, ups, file){
var result = '';
var uploaded = '0';
if (success == 1){
result = '<span class="msg">The file was uploaded successfully!</span><br>';
uploaded = uploaded ++;
if (uploaded == document.getElementById('numflowers').value){
document.getElementById(finish).style.display = 'block'; .....
}}
else if (success == 2){
result = '<span class="msg">There was an error during file upload! The file has a size of 0</span><br> File: <input name="ufile[]" id="ufile[]" type="file" size="30"> <input type="submit" name="submitBtn" value="Upload">';
}else if (success == 3){
result = '<span class="msg"> We only allow .png, .jpg, .gif, .zip, .rar, and .7z files to be uploaded. If you think we should allow other please make a suggestion on the forums.</span><br> File: <input name="ufile[]" id="ufile[]" type="file" size="30"> <input type="submit" name="submitBtn" value="Upload">';
}
var uploadp = "upload_process" + ups;
var uploadf = "upload_form" + ups;
document.getElementById('uploadp').style.display = 'none';
document.getElementById('uploadf').innerHTML = 'result';
document.getElementById('uploadf').style.display = 'block';
}
Function call inside iframe (example)
window.top.window.stopUpload(3, 1, test.txt)

View 9 Replies View Related

Call Parent Link From Iframe?

Mar 17, 2010

Alright straight to the point I have a link on the parent page of my site.

<a href="javascript: scontrols.expandit(0)">View Info</a>

I would like to be able to some how call that from the iframe.

I am just getting into java script and haven't been able to figure it out.

View 2 Replies View Related

Submitting Parent Form From IFrame?

Apr 19, 2010

What line of javascript can I use to submit a form that's inside an iFrame?Here are a couple of failed attempts:document.getElementById('captcha_iframe').forms['reserve_booth_space'].submit();window.frames['captcha_iframe'].forms['reserve_booth_space'].submit();

View 4 Replies View Related







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