can the META refresh tag be used in such a way that the parent is redirected to the new page instead of just the iframe content?<br />
<br />
i can live without this, but it would be nicer for the user to have this function.<!--content-->just being cheeky and popping to the top of the forum.<br />
<br />
does nobody have an answer either way?<!--content-->I don't see why not. Let me do some digging around for a bit of code/script I've got hiding around here on keeping stuff within a frame.<br />
<br />
Neil<!--content-->i want to move out of the frame - it stays in by default.<br />
<br />
but thanks anyway.<!--content-->Horus, I think one or both of these might be useful.<br />
<br />
* <!-- m --><a class="postlink" href="http://javascript.internet.com/page-details/load-in-frames.html">http://javascript.internet.com/page-det ... rames.html</a><!-- m --><br />
<br />
* <!-- m --><a class="postlink" href="http://javascript.internet.com/navigation/dynamic-frameset.html">http://javascript.internet.com/navigati ... meset.html</a><!-- m --><br />
<br />
The second one (dynamic frameset) is the one I was looking for and means you just set up the URL in the meta tag along the lines described in the code. I've used it for linking to pages in a frame from other other sites. For example, the link <!-- m --><a class="postlink" href="http://www.abetterworkplace.com/index.htm?http://www.abetterworkplace.com/whatwedo.html">http://www.abetterworkplace.com/index.h ... twedo.html</a><!-- m --> will take you to the "What We Do" page within the A Better Workplace website frames. Whereas without the script the link would just be <!-- m --><a class="postlink" href="http://www.abetterworkplace.com/whatwedo.html">http://www.abetterworkplace.com/whatwedo.html</a><!-- m --> and would appear outside the frameset. It does mean you have more complex URLs for links in your iframe though. <br />
<br />
Sorry, I didn't explain it very well, but hopefully you get the idea.<br />
<br />
Hope this helps<br />
<br />
Neil<!--content-->Okay, Horus, now I'm confused what exactly is it you want to do? Reading what you wrote, I've come up with the possible alternatives:<br />
<br />
1 page with an iframe - user clicks on link in iframe = opens new page with new surrounding frame and new iframe page in the middle of it - what I call the double whammy option ...OR..<br />
<br />
2 page with an iframe - user clicks on link in the iframe = opens new non-framed page - what I call the cleansheet option ...OR...<br />
<br />
3 page with an iframe - user clicks link on surrounding frame = new page with new surrounding frame and new iframe page in the middle of - a variation on the double whammy, with sauce ...OR...<br />
<br />
4 page with an iframe - user clinks on link in surrounding frame = new non-framed page - the easy cleansheet method.<br />
<br />
Options 2 and 4 should be straightforward target="_parent" or sumfing like dat. <br />
<br />
Options 1 and 3 should be easy (Some have said Option1 is always easy) with the dynamic frameset code I posted above.<br />
<br />
Am I still missing the point?<br />
<br />
Neil<!--content-->none of the above. <br />
<br />
i know i can link out of the iframe using target="_parent"<br />
<br />
the problem is that i want a meta refresh in the iframe to refresh the whole page in that window.<!--content-->Hmmm, could you please reread the whole thread and try telling us exactly what you want?<br />
<br />
Anyway, my guess of what you want is now along the following lines:<br />
<br />
1. You have an iframe within a framed page.<br />
<br />
2. You want to set a meta refresh in the iframe.<br />
<br />
3. You want the metarefresh to open a new page that takes up the whole window.<br />
<br />
4. You want the new page to be no longer part of frameset.<br />
<br />
5. You want the new page to be just an ordinary ol' html webpage.<br />
<br />
My first question now is WHY? Why have the whole frameset in the first place if you're going to automatically redirect out of it?<br />
<br />
I'm sorry I don't quite understand, guess I'm just a bit thick, but getting it clear in my own head as to what you're after is the first step to finding a solution. <br />
<br />
Neil<!--content-->sorry Neil, guess that I wasn't to clear in my first question.<br />
<br />
You have got the process for what I want to happen though.<br />
<br />
Your question "why?" (although I am not sure if this will help to find the "how?") is a good one:<br />
<br />
Answer:<br />
<br />
I have a series of different pages that are in an iframe with the same content surrounding it. One of the pages that is displayed within the iframe is a form which, when filled in with the correct information, will then open up a brand new section and I want all of the visible content to change after verifying the input. If the input is not verified, then the user is kept in the same section.<!--content-->Okay, I think I've got it, but it uses javascript!<br />
<br />
This will break out of the frameset and then after 0.1 seconds will refresh to a new page. A bit of a cobbled together job (and no I didn't code the JS, I just stole a couple of bits and joined them together) but it works. You can reduce or increase the time before it refreshes by changing the "100" down or up as you please.<br />
<br />
<br />
<html><br />
<head><br />
<title>blah blah</title><br />
<meta content="giz" description="bung 'em in to keep 'em quiet"><br />
<br />
<script language="JavaScript"><br />
<!-- <br />
if (self != top) top.location.href = <!-- m --><a class="postlink" href="http://www.htmlforums.com/archive/index.php/document.location.href;">http://www.htmlforums.com/archive/index ... tion.href;</a><!-- m --> <br />
// --><br />
</script><br />
<br />
</head><br />
<BODY onLoad=window.setTimeout("location.href='http://www.htmlforums.com/archive/index.php/index.html'",100)> <br />
<p>some content, but not really necessary cause this page<br />
ain't hangin' around long. Although I guess you could <br />
tell those who don't use JS that they're not going anywhere <br />
in a hurry.</p><br />
</body><br />
</html><br />
<br />
<br />
Are we getting closer to what you want?<br />
<br />
I did up a quick test page at <!-- m --><a class="postlink" href="http://www.motifwebs.com/frame_test.html">http://www.motifwebs.com/frame_test.html</a><!-- m --> It's just ordinary frames rather than an iframe, but the principle should be the same. <br />
<br />
The only problem I can see is that you can't seem to use the back button to get back to the original frame page. So you'll see I actually started sort of 2 pages back from the page that refreshes and found you can get back to the frameset. (EDIT: Not sure I did fix the back button problem.)<br />
<br />
Anyway, have a look while I go have a minor nervous breakdown. <br />
<br />
Neil<br />
Who is on the verge of crawling under the desk and whimpering quietly while sucking on a towel.<!--content-->it does work, and i thankyou for your help neil.<br />
<br />
just one small, niggling little thing (sorry).<br />
<br />
the page that does the redirecting expands to fill the whole window - which is not what I want.<br />
<br />
I tried to alter you code slightly:<br />
<br />
<br />
<BODY onLoad=window.setTimeout("top.location.href='http://www.htmlforums.com/archive/index.php/index.html'",100)> <br />
<br />
<br />
but it stopped working <br />
<br />
i don't know javascript all that well, so could someone help me out?<br />
<br />
Thanks for helping so far,<!--content-->Ummm, if you don't want it to expand to fill the whole window, what do you want it to do?<br />
<br />
Neil<!--content-->order of events:<br />
<br />
1. user clicks on button (in the iframe)<br />
<br />
2. new page opens (in the iframe) to validate form input<br />
<br />
3. if input is validated, a message appears (in the iframe)<br />
if not (bad input or wrong user) a different message appears.<br />
<br />
4. a redirect command in the validation page (which is in the iframe) cause the whole of the page (ie, "top") to change.<br />
<br />
<br />
I am sorry - sometimes in my attempt to be concise I miss stuff by accident (or maybe im just dumb - probably that).<br />
<br />
HK<!--content-->That's essentially how I had it set up. However, I've now split the page that redirects and becomes the top into two pages - first one can be your validation page and it will redirect to a new page that expands to be top. You will need to put all the validation could etc in the validation page and adjust it so it does NOT redirect if the form doesn't validate. Also the page that does expand to become the new _top can be coded to whatever you like, a new frameset with an iframe, a flash page, a new whatever pleases your fancy.<br />
<br />
Neil<!--content-->cool - thanks Neil<!--content-->
<br />
i can live without this, but it would be nicer for the user to have this function.<!--content-->just being cheeky and popping to the top of the forum.<br />
<br />
does nobody have an answer either way?<!--content-->I don't see why not. Let me do some digging around for a bit of code/script I've got hiding around here on keeping stuff within a frame.<br />
<br />
Neil<!--content-->i want to move out of the frame - it stays in by default.<br />
<br />
but thanks anyway.<!--content-->Horus, I think one or both of these might be useful.<br />
<br />
* <!-- m --><a class="postlink" href="http://javascript.internet.com/page-details/load-in-frames.html">http://javascript.internet.com/page-det ... rames.html</a><!-- m --><br />
<br />
* <!-- m --><a class="postlink" href="http://javascript.internet.com/navigation/dynamic-frameset.html">http://javascript.internet.com/navigati ... meset.html</a><!-- m --><br />
<br />
The second one (dynamic frameset) is the one I was looking for and means you just set up the URL in the meta tag along the lines described in the code. I've used it for linking to pages in a frame from other other sites. For example, the link <!-- m --><a class="postlink" href="http://www.abetterworkplace.com/index.htm?http://www.abetterworkplace.com/whatwedo.html">http://www.abetterworkplace.com/index.h ... twedo.html</a><!-- m --> will take you to the "What We Do" page within the A Better Workplace website frames. Whereas without the script the link would just be <!-- m --><a class="postlink" href="http://www.abetterworkplace.com/whatwedo.html">http://www.abetterworkplace.com/whatwedo.html</a><!-- m --> and would appear outside the frameset. It does mean you have more complex URLs for links in your iframe though. <br />
<br />
Sorry, I didn't explain it very well, but hopefully you get the idea.<br />
<br />
Hope this helps<br />
<br />
Neil<!--content-->Okay, Horus, now I'm confused what exactly is it you want to do? Reading what you wrote, I've come up with the possible alternatives:<br />
<br />
1 page with an iframe - user clicks on link in iframe = opens new page with new surrounding frame and new iframe page in the middle of it - what I call the double whammy option ...OR..<br />
<br />
2 page with an iframe - user clicks on link in the iframe = opens new non-framed page - what I call the cleansheet option ...OR...<br />
<br />
3 page with an iframe - user clicks link on surrounding frame = new page with new surrounding frame and new iframe page in the middle of - a variation on the double whammy, with sauce ...OR...<br />
<br />
4 page with an iframe - user clinks on link in surrounding frame = new non-framed page - the easy cleansheet method.<br />
<br />
Options 2 and 4 should be straightforward target="_parent" or sumfing like dat. <br />
<br />
Options 1 and 3 should be easy (Some have said Option1 is always easy) with the dynamic frameset code I posted above.<br />
<br />
Am I still missing the point?<br />
<br />
Neil<!--content-->none of the above. <br />
<br />
i know i can link out of the iframe using target="_parent"<br />
<br />
the problem is that i want a meta refresh in the iframe to refresh the whole page in that window.<!--content-->Hmmm, could you please reread the whole thread and try telling us exactly what you want?<br />
<br />
Anyway, my guess of what you want is now along the following lines:<br />
<br />
1. You have an iframe within a framed page.<br />
<br />
2. You want to set a meta refresh in the iframe.<br />
<br />
3. You want the metarefresh to open a new page that takes up the whole window.<br />
<br />
4. You want the new page to be no longer part of frameset.<br />
<br />
5. You want the new page to be just an ordinary ol' html webpage.<br />
<br />
My first question now is WHY? Why have the whole frameset in the first place if you're going to automatically redirect out of it?<br />
<br />
I'm sorry I don't quite understand, guess I'm just a bit thick, but getting it clear in my own head as to what you're after is the first step to finding a solution. <br />
<br />
Neil<!--content-->sorry Neil, guess that I wasn't to clear in my first question.<br />
<br />
You have got the process for what I want to happen though.<br />
<br />
Your question "why?" (although I am not sure if this will help to find the "how?") is a good one:<br />
<br />
Answer:<br />
<br />
I have a series of different pages that are in an iframe with the same content surrounding it. One of the pages that is displayed within the iframe is a form which, when filled in with the correct information, will then open up a brand new section and I want all of the visible content to change after verifying the input. If the input is not verified, then the user is kept in the same section.<!--content-->Okay, I think I've got it, but it uses javascript!<br />
<br />
This will break out of the frameset and then after 0.1 seconds will refresh to a new page. A bit of a cobbled together job (and no I didn't code the JS, I just stole a couple of bits and joined them together) but it works. You can reduce or increase the time before it refreshes by changing the "100" down or up as you please.<br />
<br />
<br />
<html><br />
<head><br />
<title>blah blah</title><br />
<meta content="giz" description="bung 'em in to keep 'em quiet"><br />
<br />
<script language="JavaScript"><br />
<!-- <br />
if (self != top) top.location.href = <!-- m --><a class="postlink" href="http://www.htmlforums.com/archive/index.php/document.location.href;">http://www.htmlforums.com/archive/index ... tion.href;</a><!-- m --> <br />
// --><br />
</script><br />
<br />
</head><br />
<BODY onLoad=window.setTimeout("location.href='http://www.htmlforums.com/archive/index.php/index.html'",100)> <br />
<p>some content, but not really necessary cause this page<br />
ain't hangin' around long. Although I guess you could <br />
tell those who don't use JS that they're not going anywhere <br />
in a hurry.</p><br />
</body><br />
</html><br />
<br />
<br />
Are we getting closer to what you want?<br />
<br />
I did up a quick test page at <!-- m --><a class="postlink" href="http://www.motifwebs.com/frame_test.html">http://www.motifwebs.com/frame_test.html</a><!-- m --> It's just ordinary frames rather than an iframe, but the principle should be the same. <br />
<br />
The only problem I can see is that you can't seem to use the back button to get back to the original frame page. So you'll see I actually started sort of 2 pages back from the page that refreshes and found you can get back to the frameset. (EDIT: Not sure I did fix the back button problem.)<br />
<br />
Anyway, have a look while I go have a minor nervous breakdown. <br />
<br />
Neil<br />
Who is on the verge of crawling under the desk and whimpering quietly while sucking on a towel.<!--content-->it does work, and i thankyou for your help neil.<br />
<br />
just one small, niggling little thing (sorry).<br />
<br />
the page that does the redirecting expands to fill the whole window - which is not what I want.<br />
<br />
I tried to alter you code slightly:<br />
<br />
<br />
<BODY onLoad=window.setTimeout("top.location.href='http://www.htmlforums.com/archive/index.php/index.html'",100)> <br />
<br />
<br />
but it stopped working <br />
<br />
i don't know javascript all that well, so could someone help me out?<br />
<br />
Thanks for helping so far,<!--content-->Ummm, if you don't want it to expand to fill the whole window, what do you want it to do?<br />
<br />
Neil<!--content-->order of events:<br />
<br />
1. user clicks on button (in the iframe)<br />
<br />
2. new page opens (in the iframe) to validate form input<br />
<br />
3. if input is validated, a message appears (in the iframe)<br />
if not (bad input or wrong user) a different message appears.<br />
<br />
4. a redirect command in the validation page (which is in the iframe) cause the whole of the page (ie, "top") to change.<br />
<br />
<br />
I am sorry - sometimes in my attempt to be concise I miss stuff by accident (or maybe im just dumb - probably that).<br />
<br />
HK<!--content-->That's essentially how I had it set up. However, I've now split the page that redirects and becomes the top into two pages - first one can be your validation page and it will redirect to a new page that expands to be top. You will need to put all the validation could etc in the validation page and adjust it so it does NOT redirect if the form doesn't validate. Also the page that does expand to become the new _top can be coded to whatever you like, a new frameset with an iframe, a flash page, a new whatever pleases your fancy.<br />
<br />
Neil<!--content-->cool - thanks Neil<!--content-->