473,403 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Working with iframe history

Hi everybody!

I'm using iframes in my most recent WebDev project called "Felix" and would like to know how I can use Javascript to make a back button for the iframe. Here's the code I have:

Expand|Select|Wrap|Line Numbers
  1. <input type="button" style="width:64px" onclick="javascript:document.getElementById('pHubiframe_resource').history.go(-1)" value="&larr;Back" />
When I use that code, I get a JScript error that pHubiframe_resource doesn't support the history.go function, if I remember correctly. Thanks in advance.
Jun 28 '08 #1
2 1686
UPDATE:

I've changed it to just

Expand|Select|Wrap|Line Numbers
  1. ...onclick="javascript:history.go(-1)"...
and it works, but it opens up the possibility for my entire page to go back to a completely different page all together. Is there a way to make it so that the button becomes disabled when the first page (which is "about:blank", but it doesn't index : / )?
Jun 28 '08 #2
acoder
16,027 Expert Mod 8TB
If you give your frames a name and access them using frames[frameName], you could call history.back() on them.
Jun 29 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Luboą ©lapák | last post by:
I have iframe in webform and I load a page into iframe, then when I click on button on this page I want go back on the previous page, which was in iframe before. How can I do it?
2
by: Bart Van der Donck | last post by:
Hi, I have a directory with a file main.htm: <html><body> <p><iframe src=i.htm></iframe></p> <p><a href="javascript:history.back()">Back</a></p> </body></html> and a file i.htm:
1
by: Rik | last post by:
Hi guys, First of all: no, frames are not evil in a backend application that should not be bookmarked or indexed, and is not reliant on browser history :-) The question: I made a tabbed...
2
by: ptarjan | last post by:
I'm trying to make a little website that allows you to post back the answer to your search query. I print out some HTML and then put an IFRAME below to let people navigate around to find the...
2
by: kwenterprise | last post by:
Hello All, I am normally great at figuring out ways around iframe issues that frustrate us all. I am using javasript to try and break an iframe that I have a banner rotator embedded in but it...
6
by: Raffi | last post by:
Hi, My web page has an iframe with a list of items from a database. These items are html links and when clicked they execute a server side script to update the database and reload the iframe...
1
by: Sura | last post by:
Hi I have a flash interactive window which has html links and this appears on an html page. This window can be moved with the mouse on the html page. The html page has an iFrame too. When the...
4
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I am using a I frame in a page and trying to set the height to height=100% and it is not working. If I use height=600px it works. I find some stuff about the DOCTYPE on the internet but changing...
5
hsriat
by: hsriat | last post by:
I have an iframe in which there is a link with href="javascript:history.back()" But instead of moving the iframe's location back, it moves back the main page. Any solution?
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.