www.webdeveloper.com
Results 1 to 3 of 3

Thread: Browser in a Browser

Hybrid View

  1. #1
    Join Date
    Oct 2012
    Location
    Painesville, Ohio
    Posts
    3

    Browser in a Browser

    Create a "browser in a browser" using iframes. Have it maintain a URL history: every time the user enters a URL in the input text field, add that URL to a JavaScript array. Implement "Previous" and "Next" buttons plus any necessary variables, so that the user can go backward or forward in the history, and the iframe loads the corresponding web page accordingly. Upon reopening your browser in a browser, the history should be accessed through the previous and next buttons.

    What I don't know is, how to save the URLs, and then retrieve those URLs upon a reload. Where would I do this?
    Here is where I am at:


    function get(eID) {
    var historyArray = [];
    var y;
    var webPage = document.getElementById(eID);
    historyArray.push = (webPage);
    for (y = 0; y < historyArray.length; y++) {
    webPage += historyArray.join();
    }
    return webPage;
    }

    function loadWebPage() {
    var webSite = get('webAddress').value;
    get('viewWebPage').src = webSite;
    historyArray.push(webSite);
    }

    function backward() {
    window.frames['viewWebSite'].history.go(-1);
    }

    function forward() {
    window.frames['viewWebSite'].history.go(+1);
    }

  2. #2
    Join Date
    Aug 2008
    Location
    Sweden
    Posts
    227
    If you want to save data locally then you should look into localStorage.

  3. #3
    Join Date
    Oct 2012
    Location
    Painesville, Ohio
    Posts
    3

    Thanks refreezed

    Quote Originally Posted by refreezed View Post
    If you want to save data locally then you should look into localStorage.
    Thank you very much. You just confirmed what I was finding on the internet. My "instructor" is not very instructional or forthcoming with her instructions or directions. Thanks again!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles