PDA

View Full Version : Frames and URLs



Mike
01-12-2006, 10:05 AM
Hi all,

Right, this is a little tricky to explain...

I have a page with an iframe in it, but need to get the URL parameters from the main page. The thing is, I need to put this bit of code in the page that is in the iframe. So basically, the page inside the iframe, gets the details of the page outside the iframe. Get me? :)

Could anyone help me with this?

Cheers,
Mike

Chris
01-12-2006, 10:28 AM
In php?

Mike
01-12-2006, 10:37 AM
Yeah, that would be best.

The thing is PHP can only be placed in the page thats inside the frame, the other page won't accept it.

Chris
01-12-2006, 11:50 AM
Well... here is the thing.

IFRAMES are client side, so you need a client side solution. Meaning javascript.

If the parent page had server side programming capabilities you could pass the necessary information to the IFRAME through a query string on the IFRAME url. But if it is just straight HTML and has to remain that way, then javascript is your only option... and even then its not much of an option since you'd need to reload the iframe from itself to then pass the information from JS to your server side technology.

Mike
01-12-2006, 12:26 PM
Seems complicated... do you know of anywhere where I could find out how to attempt it? I am absolutely clueless when it comes to JS.