View Full Version : Redirect iframe source?
mvogel
03-24-2008, 05:56 PM
I have an iframe on a webpage that is a form on another system. When you hit submit on the form, the form is replaced with a "results" webpage in the iframe. I want to detect the source of this results page and depending on the results redirect to another page. I have tried to read the src of the iframe through an onload script, but that doesn't seem to work.
Is there any way to know the src of the iframe and then change it dynamically based on its value?
Medyman
03-25-2008, 12:11 AM
Hmm...don't understand why you're doing it this way. It's a little suspicious, to be honest.
Do you have control over the "results" page that shows in your iframe? I'm assuming not, but just making sure.
mvogel
03-25-2008, 01:33 AM
I use a service bureau for my customer transactions. I am using the iframe approach so my customer does not know that there is a third party service bureau involved. Of course they can view the source and see that there's an iframe and that the link is to a different domain, but from a marketing perspective I want to minimize any branding except my own.
But using iframe approach has its limitations. For example, the service bureau page has a "help" button on it which brings us a generic help screen for the service bureau. What I want to do is display my own help screen rather than the generic one. I was hoping that I could write a javascript that detected the new src of the iframe and if it equalled the URL of the generic help screen changed the source to my own help screen.
That's the goal.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.