how can i add to this code a previous page link using javascipt.

Posted on 2008-11-04
Last Modified: 2010-04-06
Hello i need to add to this javascipt condition back to previous page or history -1 and i need to check if the previous page was not in the domain get back to index page please give mthe full code based on this query below
if ( notification == "b")

	//add here the navigation details 			







Open in new window

Question by:Audiominds
    LVL 7

    Expert Comment


    Hisotry object  - history.previous method
    previous Property
    The previous property contains the complete URL of the previous element in the History list, and is the equivalent of the URL the user would go to if they selected Back in the Go menu.
    Syntax: history.previous


    Author Comment

    thanks ASPSQLServerCOM can anyone help add the code to my scipt showed above as i am a newbie with these stuff .
    LVL 7

    Accepted Solution


    var url;
    window.location = ""
    are you looking to disable to back button? there are couple of ways to do that too

    Open in new window


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
    Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now