How do I bust my way out of an iframe? -
02-11-2005
, 11:25 AM
Greetings,
To take a look at the issue, go to
http://www.spcanywhere.com/enterprise_test.html, and click on an "Add to Cart"
button. Then, in the shopping cart, click the "Continue Shopping" button, and
you will see what is happening. The prodcuts.html page, accessed by the
"Continue Shopping" button, is confined to the iframe on the right side of our
page.
Are there any tricks, using javascript, or something; where I can bust out of
the iframe, and have our products.html frame take up the whole window?
For the "Continue Shopping" button, I can only provide a link. I cannot
provide any code to go with it, as it is a link I am merely providing to our
shopping cart service, for their code.
Some background:
We have a comprehensive website already developed, that has several different
separate product pages. The page accessed above is just a test template for one
of our product pages.
The website, as it runs right now, makes use of a third party shopping cart
system, that it calls.
When the shopping cart is presently called on the web site we are now using, a
whole new Window, with the Shopping Cart, appears.
We need to integrate the shopping cart into our website (like in the link I
provided), rather than having a whole new Window appear (as it is presently
doing).
So, what we are doing, is making use of scripts provided by the Shopping Cart
company, for the express purpose of integrating the shopping cart into our
website.
It works great (as you can see), as the user will click on and "Add to Cart"
button on our site, and the Shopping Cart pops up in an iframe on the right
side of the page.
When they press the "Continue Shopping" button from within the shopping cart,
we have the button call our products.html page, so that they can, from there,
shop around for any of our other products.
The problem is, this product page is confined to the iframe that the shopping
cart is confined to on the page, rather than cancelling the whole window, and
starting up fresh on our products.html page.
I realize that is the nature of iframes; but at the same time are there any
ideas for how I can resolve this issue?
For instance, can I have the "Continue Shopping" button (which I can only
provede a link for) call a page that would have some javascript or vbscript
that would command the whole window (not just the iframe) be replaced by the
products.html page?
Thank you,
Jim |