Results 1 to 5 of 5

Thread: Needing Help

  1. #1
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Needing Help

    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

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. The Following User Says Thank You to djr33 For This Useful Post:

    Studisevn (07-07-2011)

  4. #3
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    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

  5. #4
    Join Date
    Jul 2011
    Location
    USA
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Studisevn is right..crome doesn't allow any toolbars.

  6. #5
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,880
    Thanks
    49
    Thanked 265 Times in 257 Posts
    Blog Entries
    56

    Default

    In the iframed page, put something like:
    Code:
    <body onload="document.getElementById('main_address_url').innerHTML=top.location.href">
    <div id="main_address_url"></div>
    This is an iframed page
    Arie Molendijk

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •