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


ADVERTISEMENT

Sending A Variable To Another Page

May 17, 2004

I have a page with a form that a user completed. When they hit submit this calls some javascript. This javascript stores some XML in a variable and inserts the values from the form into the correct parts of the XML.

What I need to do is submit this XML or variable to another page. in effect, the use ris submitting the form to generate some XML then i want to send this XML to another page.

here is the code I have so far:

PHP Code:

<html>
<head>
<script>
function thename(){
var username = form1.username.value;
var password = form1.password.value;
var phone = form1.phone.value;

theXML = "<?xml version="1.0"?>
<novo-xml>
<register>
<client-id>test</client-id>
<password>" + username + "</password>

<user-id>" + password + "</user-id>
<phone-num>" + phone + "</phone-num>
<app-id>test</app-id>
<channel>I</channel>
<user-type>upgrade</user-type>
</register>
</novo-xml>";

//I was using this alert to display the XML
//alert(theXML);

}
</script>
</head>
<body>
<form name="form1" onsubmit="thename();">
username <input name="username"><p>
password <input name="password"><p>
phone <input name="phone"><p>
<input type="submit" name="submit">
</form>
</body>
</html>

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

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

Sending Variable To Php ?

Jan 10, 2005

I'm using a js menu like this:

slideMenu.makeMenu('top','OKP')
slideMenu.makeMenu('sub','Level A','../OKP/KlassementOKP.php?level=A','mainFrame')
slideMenu.makeMenu('sub','Level B','../OKP/KlassementOKP.php?level=B','mainFrame')

As you can see I send the variable level=A to php on next page. What I would like is send another variable for the TOP item: OKP How should I do that ?

View 2 Replies View Related

Iframe - Loads A Page With Variable Contents - OffsetHeight Returns The Height Of The Document Body

Sep 21, 2010

I've got an IFRAME it loads a page with variable contents. I need to know the WIDTH of the body of that page. I'm using offsetWidth and offsetHeight

Quote:

This is weird....offsetHeight returns the height of the document body. offsetWidth returns the width of the iframe!

View 2 Replies View Related

Sending Dynamic Created Variable In Ext Js

Mar 2, 2009

I am using ext js library to built ajax base site.I need to build dynamci variable and then send that variable with same name in paramter to php i have following function where first i check the array length and then loop untill the array lenght come to end and within that i get the value from html.now i want to send dynamic variables as parameter but i can do this

[Code]...

View 1 Replies View Related

Sending A Variable To A Js Function - Not Working

Nov 18, 2010

I've been fighting this one for a few months now, and it is causing me to have to create multiple functions that basically do the same thing. I am using the three functions below to replace text between two div tags on a page, based on a link that is clicked:

<td><a href="javascript:void(0)" onclick="htmlData('ajax/loginContent.php', 'view=1','data=2','displayField=txtResult')">Active Jobs</a></td>
";

Then further down the page:

<div id="txtResult">replace this content</div>

For some reason, I CANNOT send the div id name as a js variable. When I do it errors out. BUT if I replace displayField in the js functions below with "txtResult" it works fine.

function GetXmlHttpObject(handler) {
var objXMLHttp=null
if (window.XMLHttpRequest)
{

[Code].....

View 6 Replies View Related

JQuery :: Sending The JS Variable Thought The Ajax?

Feb 7, 2011

Im trying to send JS variable thought the jQuery Ajax,The problem is that the php page recive only null ....

My code below:

Code:

$(document).ready(function(){
$('#start').click(function(){
$('#text').html($('#file').val());
$('#response').css('display','block');

[code]....

View 3 Replies View Related

Sending Jscript Client Side Variable To Asp File

Sep 6, 2005

I have an html page, with jscript inside. some variables, some of them
multidimensional arrays. i need to send this information, which can be
changed by the user, to an asp file. the only way i could think of, is
putting it inside hidden box and sending the form. is there any more
elegant way?

View 6 Replies View Related

Sending Time Counter To Next Page?

Dec 20, 2010

User gets for every minute staying on the site 1 credit. Credit is updated each minute, even if the page is not reloaded. But also if the page is reloaded or user continue browsing to other pages inside our site, counter should continue where it stayed in the previous page. If the user leaves the site it doesn't need to continue.

How would you do this? Is it possible to send in javascript value to the next page? Otherwise I have some other ideas, but I am not sure which is the most common: 1. On page leave (if this exists in javascript?) call with ajax timer.php where you assign time to the session. 2. On each 5 seconds call with ajax timer.php where you assign time to the session. 3. Do sql call for each 5 seconds. I guess this is not ok because it is too wasting.

View 6 Replies View Related

Sending Page As XML Lets OffsetWIdth Return 0

Nov 1, 2006

When use text/html as header for my page the method
element.offsetWIdth/Height work as usually and return the real
width/height of an element, but when I use XML as type (which is
necessary in modern browsers to use strict XHTML) the function returns
just 0.

Can somebody help me, it's very important. The prototype function
Element.getDimensions() doesn't work in strict mode.

View 2 Replies View Related

Safari Not Sending Requests During The Onclick Event Due To New Page Load?

Jul 7, 2010

I have a site which displays a selection of advert listings. We log the number of clicks each advert receives via ajax requests.The listings link to both internal pages on our site and external pages, hence the ajax - we cannot log the'clicks' by logging the requests on the destination pages as these are not all on our site for us to log. Also, I don't want to potentially get false positives e.g.from bookmarked pages - hence I am logging the actual clicks, not the requests on the destination.

All is OK in most browsers, but there is a problem with Safari (I am running Safari 4.0 on Windows XP running in Virtualbox OSE) but only where the destination is to open in the same window/tab (some listings go to a new window, some don't). I am logging clicks via an ajax request in the onclick event, which is working fine when the listing is to open in a new window, but it appears that when a new window is not to be opened, the ajax never gets sent.A have constructed the following minimal test case:

index.html

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" [code].....

Note the line commented '****' in index.html which cancels the action of the link. When this is not commented out, the ajax request is sent correctly. Without it (the desired situation) the ajax request never gets sent. Its as if Safari saves up the ajax requests to do later, but never sends them as the new page cancels all such 'saved up' actions.I am using the Safari web developer tools, but I have also checked this test case by checking the Apache logs. Note that as a test case I don't pretend that it will work in IE, but it should work in standards compliant browsers and has been tested on Firefox 3.6.6 and Opera 10.6. The Apache logs show that logger.txt is being requested, unless it is already in the browser cache.Possible workarounds I've considered, but would prefer to avoid:

On the site in question the only such links that currently open in the same window are internal, so I do have the option of logging safari clicks by logging these requests as opposed to clicks and checking the http referer on the server side. As this is not a very flexible solution as it relies on these specific circumstances, also relies on all other links successfully making a new window, and furthermore relying on http referer could result in false negatives I'd rather find a solution within the javascript.I haven't checked whether an asynchonous request would work, but I don't wish to do this anyway just in case there is ever a server problem that prevents the response coming back (note that for these purposes the response is actually superfluous - we are sending the server a message but don't need anything back). I also want to avoid the delay in sending the user to the destination - there is no point having to wait for a response we don't need.Lastly, and my prefered workaround unless I can find anything better, is to make Safari (only) open all links in a new window anyway.

View 1 Replies View Related

Iframe Resizing Each Time New Page Loads In Iframe

Aug 14, 2009

I'd like to resize an iframe into which different (same domain) pages of differing heights are loaded. I can do a first-time resize no problem. It's the subsequent reloads that need to pass back their height to the parent page There seem to be lots of solutions for that around, but few I can see for resizing each time the iframe reloads. One is described here on another board [URL] but unfortunately the test page is no longer around (or indeed the site), so the full code is no longer available there. This one works, almost, for me: [URL] it does resize for me, but not quite sufficiently high each time - about 90% of what is required: [URL] Is there a way to add on sufficient extra margin that scrollbars no longer appear?

View 8 Replies View Related

Redirect Script And Modify It So That It Rotates A Banner Image Instead Of Sending The User To Another Page?

Jun 12, 2011

want to take this redirect script and modify it so that it rotates a banner image instead of sending the user to another page. The script works so that if the window is out of focus for 10 seconds, it redirects. The images are defined in an external style sheet so I guess I'll have to move that into the document. Also, I want it to be able to work more than once with multiple images, like if the user opens a new tab, comes back, goes to a different tab, the image should change twice. Here's the script:

<script type="text/javascript">
var xScroll, yScroll, timerPoll, timerRedirect, timerClock;
function initRedirect(){

[code].....

View 3 Replies View Related

Display Google Page In Iframe - Iframe - Js - Src

Mar 29, 2011

I have this, and works fine ... googles for quoted string

<form method="get" action="http://www.google.com/search" target="_self" >
<input type="submit" value=""<%=con.rs.getString("term")%>"" />
</form>

instead I want to display google page in iframe, like:

<input value ="<%=con.rs.getString("term")%>" style ="button" onClick = "document.getElementById('mainContenceFrame').src = 'http://www.google.com/search';" />

View 1 Replies View Related

PASSING Variable Into IFRAME Call...HOW,

Dec 15, 2005

I have an iframe....

<iframe src="somepage.html?var="tom";vartwo="jane";varthree="peter"">

Now....that is all great...BUT, I need to pass another variable INTO the iframe like the others (var, vartwo, varthree) and I won't have that variable UNTIL I do some javascript function to extract a background color from a div tag. Basically, I have to pass a bgcolor into the iframe so the resulting page will then display itself with a color that matches the parent page. Its a backend process....basically, the backend app needs "backcolor=" appended to the iframe.....BUT the iframe is loading first...so how do I do this?

View 2 Replies View Related

How To Resize Iframe From Page In Iframe

Mar 18, 2011

I have a web page which will display another web page in an iframe. But the content inside the iframe may change while the user interacts with it so I need to be able to resize the iframe height from code on the page inside the iframe. Any tips on how I can do that? I am using php and javascript.

View 1 Replies View Related

Get A Variable From A Remote Page And Define As Variable?

Apr 26, 2011

I have a programing problem that have been around for ages. I have search on google using several expressions and words and after hours of digging i'm still unable to do it.I would like to get a value from a HTML page hosted remotely with an inconstant value. Then define this value and name as a javascript variable and apply or show in my page.P.S. Is there any way to make a domain lookup in javascript? I mean a user enters a domain and the script converts to an ip and shows to the user. If not thanks, probably it can only be done in the server side...

View 6 Replies View Related

Iframe Button That Adds A Value To Parent Variable?

Aug 12, 2011

I am trying to write a script that allows a button in an iframe to change the value of a variable that is in the parent page. I then want to have an if statement in the parent that will change the url of the iframe ( or even change the url of the parent)Here's what I have for the parent:

HTML Code:
<html>
<head>

[code].....

View 12 Replies View Related

Iframe Window.location As A Global Variable - String

Oct 18, 2010

I have come up with form which pulls membership id, allows checkbox selections and commentry (custom feedback). The final piece that needs to be captured is the iframe's url. Now the content in the iframe is content produced by (madcap) flare.

I need to capture the window.location of the iframe url and pass that onto the asp.net masterpage. The iframe is also located in a content page. The iframes content is controlled by it's own TOC. I have added a script to this output so that each time the content (page) in the iframe changes the script alert's me of the new URL of the page just clicked/opened (this is the information I need passed as a variable).

Here is the code producing the desired alert output (page url).

Code:

The above produces the output I would like to capture (but instead of an alert output, I require this as a string) which will allow the insertion into my form as the final piece of information required.

I am not sure how I can convert or catch the output. Of course I would not want to use the alert function everytime the page changes, but would like to have the window.location bound to a string which I can then use when inserting into my codebehind sql statement.

All the captured data is being inserted using vb.net into a sql table.

I just need to make that content page > iframe (window.location) a global variable that my masterpages codebehind can inject into the INSERT SQL statement.

View 11 Replies View Related

Make Whole Page Send The User After Some Seconds To Another Page And Not Only The Iframe And Parent Location?

Jan 10, 2011

I have an webbpage, and in the middle of it there is an iframe to a php site. So i have used this code, so after some seconds the iframe will send the guest to another page. <meta http-equiv="refresh" traget="_top" content="5 url=http://mypage.com"/> But the thing is that i want the WHOLE page to reload, and go to that page after 5 seconds (we can say). With that code, only the iframe are going to another page. Is it possible to make the whole page send the user after some seconds, to another page and not only the iframe?

View 1 Replies View Related

Go To Next Page - Load The First Page Of A Series Of Pages Into An Iframe When You Click A Link

Aug 15, 2006

1. Load the first page of a series of pages into an iframe when you click a link
2. On each click load the next in order page
3. When last page has loaded if clicked again will start from the beginning.

What I am doing: I am creating a tutorial for a friend who cannot figure out how to use her new rental management program. I could use a manual slide show to have her click for the next image however, there are a LOT of tutorial images which show her what to do at that point. Her program contains a great number of setup screens, report screens etc. This means the slide show would be sitting there loading all these images before it will work. So, I figured, OK make a page with an iframe, and then I could put each image on it's own little page i.e. page1, page2 etc. Place a little button, or a next link, then have the link load the pages into the iframe in order.

View 5 Replies View Related

JQuery :: Make Iframe Page That Loading A Page From Other Site?

Oct 11, 2009

i want to make a iframe page that loading a page from other site. I have try "jQuery iFrame Sizing" to set auto height in iframe... but it is failed.

This is my code :
-------------
on Head
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/iframe.js"></script>
on Body

[Code]....

View 1 Replies View Related







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