A Link In Parent That Refreshes A Page In An Iframe?
Feb 7, 2011
My site has a menu + iframe layout. Clicking on the menu link loads a page in the iframe. The iframe is set to a specified dimension.
I only have a single page that loads in the iframe. Clicking on the menu link loads a specific section on the page using the name anchor. The specified dimension of the iframe allows for the selected info to be visible.
I can create a new page for every link, but to the site's nature (its like a catalogue), I rather have it on a single page and have it called by the name anchor. I am trying to set it so that every time a menu link is clicked, the single page refreshes itself, and then goes to the anchored location.
I need this for a reason.
I have tried many things but I have not got it working.
Here is my iframe:
Code HTML4Strict:
<iframe name="data" id="data"></iframe>
Some of the codes I tried messing around with:
Code HTML4Strict:
<a href="info.html#red" target="data" onclick="window.location.reload()">Red</a>
Code HTML4Strict:
<a href="info.html#red" target="data"
[Code]....
View 4 Replies
ADVERTISEMENT
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
Jul 22, 2011
I am having difficulty in opening a link in an Iframe. If I explain, I have four pages
-Page 1 containing the Iframe
-Page 2 containing a series of thumbnails that opens in Iframe on page 1
-Page 3 is the larger image that opens in the Iframe on page 1 after clicking the thumbnail on page 2
-Page 4 is a page with a linking menu that has a link to page 3
The task I am struggling with is to get the link on page 4 to open the larger image of page 3 in the Iframe on page 1. Now I maybe doing something wrong but the code is opening page 2 in the Iframe on page 1. Below are the links to the pages in question.
Page 1 Art for Sale - Bertram Enterprises
Page 2 Bertram Enterprises Collection_Ver2
Page 3 [URL]
Page 4 Jenni Dutton - Bertram Enterprises link near bottom of page - Art for Sale
I wish to use this on many more of the images.
View 7 Replies
View Related
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
Aug 29, 2011
Is it possible to access javascript variables in an iframe src page from the parent page, or vice versa. How do you do this? What about the DOM?
View 1 Replies
View Related
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
Mar 12, 2011
I'm new to JavaScript and i have hit a slight problem with a project. basically, my issue is with iFrames - in particular, passing a value from an iframe to the parent page. i am trying to find a way for to pass the url of an iframe source back to the parent. hardcoding the source, or using a form within the iframe is ok - however i want to be able to view any page on the web within the frame, and for the parent page to be bale to identify what url is being loaded within it.
View 1 Replies
View Related
Nov 5, 2006
My main browser page has an iframe. Whenever the iframe is reloaded
(updated), I want to automatically refresh the main webpage as well.
How can this be done, preferably using javascript?
View 2 Replies
View Related
Mar 20, 2009
i have a page containing an iframe somewhere in the middle of it. the iframe stretche to the end of the page and its height is calculated from its content with javascript.
i want some of the pages i load into the iframe to have a "back to top" link at the bottom. but i can not put the anchor inside my iframe because my iframe doesn't start at the top of the page.
so i put the name linke of the anchor at the top of the parent page which has the iframe inside. but i couldn't find a way to call that anchor from within the iframe.
i'm sure this could be done with a simple code of javascript. how do i get to the parent frame within the iframe?
View 1 Replies
View Related
Jan 12, 2010
I have an instance where I do some work in a page contained in an iframe and then need to either outright move or just copy the resulting page elements into the parent page. All of the back end stuff works fine, but the Javascript just runs and doesn't produce anything. The script in question:
Code:
var AddressListDiv = parent.document.getElementById("AddressListDiv");
var ListPanel = document.getElementById("ListPanel");
for(var LPC = 0; LPC < ListPanel.childNodes.length; LPC++)
{
[Code]....
I think I'm running into a restriction in Javascript, but I'm not 100% sure.
View 5 Replies
View Related
Aug 31, 2009
Im doing an Ajax call which calls a Java struts 2 action. This action basically just does a DB update. There is no data being returned to the client. The page refreshes to a blank white page. I dont want his to happen. I want a pop up box on my page. The ajax call happens when i press a save button. Here is the jquery code:
[Code]...
Im a Jquery newbie. As far as I can gather JQuery is expecting data back. It gets nothing back (which is what I want). But Jquery does a refresh with this. Hence why my page goes to a blank white page. I think this is what is happening
I was thinking of putting in my dummy div and loading the blank/empty no html into the dummy div but there has to be a way to stop the white page showing up. I dont get pop up boxes either as shown in code above:
View 2 Replies
View Related
Aug 5, 2009
I have a parent page containing an iframe. The parent page has a menu in it which opens links in the iframe. I want to highlight different bits of the menu according to which page has loaded in the iframe.
So I would like to do something like this:
1. Use PHP to extract the file name (minus 'php' at the end, of the page loaded within the iframe (which I can do fine).
2. Use javascript onload so that the iframe sends this value (say 'pagename') to the parent page when it loads any page in the iframe.
3. The parent page, having received that variable into its header, will adjust a line of css to something like: .pagename {background-color:red;}
And so the menu link for pagename.php will be colored red
4. When pagename1.php is loaded into the iframe, that will send 'pagename1' to the parent page, change the CSS in the head, and therefore change the highlighted menu item from pagename to pagename1
Is this possible? And easy? There seems to be a lot of stuff online about moving variables from iframes, but mainly in the context of form entries from an iframe to a parent, eg here:
[URL]
parent.function_name(); seems to be needed along the way. But I am not sure how to proceed.
View 14 Replies
View Related
May 14, 2010
I have an iframe on one of my pages, and i need to resize it to fit content thing is i need to resize the iframe from the iframe src page.
I have this code:
Code:
window.onload = function()
{
resizeFrame();
[Code]....
but it doesn't seem to resize the iframe...
View 1 Replies
View Related
Sep 24, 2009
How to get post data from a page loaded in iframe in parent page
View 1 Replies
View Related
Aug 7, 2010
On the html form the user enters the time to start, time to end, and frequency of a reminder alert.I pass this to my javascript and then am trying to setup a 1 second loop where it checks against the clock to see if it's time to begin the reminders. I get to the function, but the setTimeout doesn't complete and my page just refreshes.
View 5 Replies
View Related
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
Jun 24, 2009
I'm trying to use javascript to submit a form. I was wondering whether this was possible.
<html>
<head>
<script language='JavaScript'>
function submitURL(url) {
document.mForm.url.value = url;
document.mForm.submit();
}</script>
[Code]...
Clicking on the link puts the correct URL in the input field, but then the page refreshes and nothing gets sent to test12.php.
View 1 Replies
View Related
Aug 12, 2009
I had a small problem in my page. There are some select menus that the user can select and there is a download button which on click should allow the user to download a file based on the selected options...I used the following code under the onclick event but the problem is that it allows the user to download the file but the page refreshes itself or in other words all the selections are lost when the download window opens
View 1 Replies
View Related
Aug 24, 2011
I have the following JS. In this, when I press the submit button, I have a JS function that will create 2 input boxes and one more submit button.
When I type the values in those input boxes and click on the newly created submit button, the addition of the above input values should display. But the entire input boxes and submit button gets lost and the old page is getting displayed.
My JS:
View 5 Replies
View Related
Jul 23, 2005
i have a login area (user/pass text
boxes). when the user submits the form, the page is reloaded with with
a global php variable "loggedIn" set to true. i also store the
username and password in the page in a hidden form -- so that it can be
passed to other pages on the site through standard navigation
(maintaining the "loggedIn" status). however, is there any way to save
this information if the user hits refresh?
as it stands, whenever the
user hits refresh, the user/pass data is lost, and loggedIn is set to
false. can this be worked around without using cookies?
View 4 Replies
View Related
Feb 18, 2011
I have written code that looks like this. The code works great for about a split second and then the page refreshes itself and I am back to square one. How can I prevent the page from refreshing itself and wiping out my jQuery changes. The page I am working on is located here [URL]
[code]
<script type="text/javascript" src="jquery-1.5.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
[Code].....
View 4 Replies
View Related
Oct 14, 2011
I have form input fields but it is being called through iFrame by the page. But how do I get or pass the data entered into the parent page.
[Code]...
View 1 Replies
View Related
Oct 31, 2010
What I want to do is go from page1 (which does not have an Iframe) to page2 (which does have an Iframe) and change the content of that Iframe based on the links clicked on page1.
So say I click link1 on page1, I want page2 to show up and for the Iframe to show link1 content.
If I click link2 on page1, I want page2 to show up and in the Iframe I want to see link2 content.
If there's a javascript code for this that works.
View 2 Replies
View Related
Mar 27, 2011
I have this code:
Everytime it refreshes it shoots me back to the top of the page.
How can I stop that from happening?
View 1 Replies
View Related
Oct 22, 2005
I have PAGE1 with the link to PAGE2 with iframe. (iframe load several
naked html). I want to add directive to the link to point sprcific
content of iframe. to make it clear
link on PAGE1 -> load PAGE2 with iframe -> iframe content is specified
on link = whole PAGE2 with iframe with desired content...
solving problem with creating several different PAGEs2 poining wanted
iframe src is not the case.
View 5 Replies
View Related
Oct 18, 2011
I have several hundred html links in a file "main.html" pointing to external websites. ie: "external.html"
When a user clicks an external link from within "main.html", I want to bring up "external.html" in all its glory, but with a banner / header across the top (I am guessing iframe is a good option) - so effectively the link will take us to "frame.html", with "banner.html" and "external.html" in an iframe (or alike).
The banner has to be populated with information specific for that "external.html" file. ie: when they click on the link to "external_1.html", the header might have the text "external_1".
So, I am happy with doing this as a one off, but can't see the method to have a single 'onclick' script to pass the required information from "main.html" to "frame.html", and then for "banner.html" to be updated with the text passed from the 'onclick', and to know to call in the correct "external" to populate the iframe.
I will further complicate it by asking if it is possible to have all the scripting required contained within "main.html"?
View 1 Replies
View Related