Need your help: Redirect any link clicked + redirect on page views

Discussion in 'JavaScript' started by MrHost, Jun 6, 2009.

  1. #1
    Hi Im looking for a simple code to redirect to a specific URL on any click on page and redirect to certain url after a certain number of page views.

    Can someone lend a hand?

     
    MrHost, Jun 6, 2009 IP
  2. Worldwidirectory

    Worldwidirectory Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The problem is "after a certain number of page views", you mean page views from the same visitor?. Otherwise it will be difficult without using some kind of server-side programming.

    Setting the links to point to a certain url would be as easy as rertieve all links with a document.getElementsByName("A") and use an onclick event on all of them. Then the onclick function can check whatever you like and change the src attribute to your desired url given the case.
     
    Worldwidirectory, Jun 8, 2009 IP
  3. MrHost

    MrHost Active Member

    Messages:
    132
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    Yes, thats what I want is number of page views from same visitor then redirect...

    Can you help me? Ive posted on other forums but people are so difficult in answering questions nowadays, thats what I thought of forums were to share information.

    Id appreciate your help...if you can tell me how to do it..
     
    MrHost, Jun 8, 2009 IP