PDA

View Full Version : Needing Help



Studisevn
07-07-2011, 06:20 PM
Ok i need help. The problem im having is i want my iframe to grab my adress bars url and display it inside the iframe

djr33
07-07-2011, 06:46 PM
Are the two URLs on the same domain? There will be security restrictions if not.

You can get the URL of the current page (within an iframe or not) and you can get the SRC of the iframe. So if you can do this from the top level page, it should work. But the iframe page will probably not have permission to get the URL of the top level page.

Can you explain more about what you are trying to accomplish? There may be a better approach since this is difficult.

Studisevn
07-07-2011, 07:12 PM
well its for a chrome extensions since google chrome doesnt allow toolbars to be made i was thinking if i could create the toolbar as a banner and use the iframe as the current web page then i could accomplish what im trying to do

josephperkins
07-27-2011, 08:59 AM
Studisevn is right..crome doesn't allow any toolbars.

molendijk
07-27-2011, 12:56 PM
In the iframed page, put something like:

<body onload="document.getElementById('main_address_url').innerHTML=top.location.href">
<div id="main_address_url"></div>
This is an iframed page
Arie Molendijk