Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Iframe with address bar

  1. #1
    Join Date
    Aug 2009
    Posts
    11
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Exclamation Iframe with address bar

    i wanted to know if there was any code that shows an iframe with an address bar, kinda like a browser?

    here's the iframe code i already have
    <div align="center">
    <iframe name="iframe" src="http://allaboutnetwork.freeforums.org/index.php" width="1125" height="1750" scrolling=yes frameborder=0></iframe>
    </div>
    thanks

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Do you want a text input so you type in the site press enter and it goes to it? Or what?
    Jeremy | jfein.net

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

    Chrismr3000 (08-19-2009)

  4. #3
    Join Date
    Aug 2009
    Posts
    11
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    actually no, i want it so people can see the address and only copy it, but have it integrated with the iframe

  5. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Ok, Here:
    Code:
    <script type="text/javascript">
    var _ = function(id){ return document.getElementById(id); };
    window.onload = function(){
      var text = document.createElement('p');
      var url = document.createTextNode(_('iframe').getAttribute('src'));
      text.appendChild(url);
      _('url').appendChild(text);
    };  
    </script>
    <div id="url">
    
    </div>
    <div align="center">
    <iframe name="iframe" id="iframe" src="http://allaboutnetwork.freeforums.org/index.php" width="1125" height="1750" scrolling=yes frameborder=0></iframe>
    </div>
    Jeremy | jfein.net

  6. The Following User Says Thank You to Nile For This Useful Post:

    Chrismr3000 (08-19-2009)

  7. #5
    Join Date
    Aug 2009
    Posts
    11
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    theres a preoblem, i pasted the code but when i click alink within the frame the text just shows "http:/allaboutnetwork.freeforums.org". I want the text to be dynamic.

  8. #6
    Join Date
    May 2008
    Posts
    144
    Thanks
    6
    Thanked 11 Times in 11 Posts

    Default

    the iframe changes depending on the link?

  9. #7
    Join Date
    Aug 2009
    Posts
    11
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by thenajsays View Post
    the iframe changes depending on the link?
    no, the iframe first opens up as the link to my forum, nile made a great code of kinda what i wanted but the text just says my forums home address, what i want is to have THAT text change to the address of what i am browsing in the iframe and every time the url changes i want that text to change with the changing url of the iframe.

    that understandable?

  10. #8
    Join Date
    May 2008
    Posts
    144
    Thanks
    6
    Thanked 11 Times in 11 Posts

    Default

    cool... thats what i thought you meant... lemme think about it and ill see what i can come up with

  11. #9
    Join Date
    Aug 2009
    Posts
    11
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    k, thanks. i sadly haven't seen a code for this, hope someone can make it

  12. #10
    Join Date
    May 2008
    Posts
    144
    Thanks
    6
    Thanked 11 Times in 11 Posts

    Default

    its impossible to do unless the iframe href is within the same domain as the parent window... i hope this helps

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
  •