dynamically create iframe name

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rexexdesign
Forum Newbie
Posts: 5
Joined: Thu Nov 02, 2006 10:29 am

dynamically create iframe name

Post by rexexdesign »

Hi Everybody,

I have a problem. I dynamically load a website into an iframe. But once the iframe is filled the next time I target it, it opens the website in a new window.
When I put a second iframe on that page and once it filled the first one it targeted the second one it worked. That is why I need the name of the iframe to grow by 1 everytime it is loaded.

For example: iframe1, iframe2, iframe3


Any help is greatly appreciated.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

That sounds like very strange behaviour. I think it may be better to find the reason the pages jump out of the iframe.
rexexdesign
Forum Newbie
Posts: 5
Joined: Thu Nov 02, 2006 10:29 am

reason why

Post by rexexdesign »

I am working on a flash site and it has dynamic content loading in. So the button code always changes... Flash is able to always trigger that iframe if its a static link, but since it is dynamic, it works once and then after that (the frame is filled) it opens a new window instead.

The only way I found it working is, when the name of the iframe changes. It is important that the entire page does not reload. Only the name of the iframe changes.

So lets say it is a php file and every time the iframe is loaded it the name is one higher (iframe1, iframe2) I could accomadate that in flash.

THANK YOU
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

You want to change the iframe's name without refreshing the page the iframe sits in? That's Javascript.
rexexdesign
Forum Newbie
Posts: 5
Joined: Thu Nov 02, 2006 10:29 am

Post by rexexdesign »

ok... and do you know the code ;)
Post Reply