Results 1 to 2 of 2

Thread: Javascript to track click activity

  1. #1
    Join Date
    Nov 2009

    Javascript to track click activity


    i have a page which is divided into 2 frames. one frame holds my own content whereas the other is a content from the web. I need to track the activity on the page. for example there is a timer of 3 mins if there clicks detached in the frame the time will reset else when the time is up the page will be redirected. I understand that I can only track activity on page that I have created. The following is the code I had by a fellow forum-er in asp.net but the javascript didn't seem to work.
    HTML Code:
    <script type="text/javascript">
            var timer;
            window.onload = function()
                timer = setTimeout("redirectpage()",10000);
                parent.frames[0].frameElement.contentWindow.document.attachEvent("onclick", resetTimer);
            function resetTimer() 
                timer = setTimeout("redirectpage()", 10000);
            function redirectpage() {
                window.location = "ActivityPageAuto.aspx";

  2. #2
    Join Date
    Nov 2009
    This is how my frames are set

    <frameset cols="21&#37;,*">

    <frame frameborder="0" noresize="noresize" scrolling="no" src="TPDIrectory/Buttons.aspx" />
    <frame frameborder="0" name="mainframe" noresize="noresize" scrolling="no" src="http://www.street-directory.com/tp/campus.cgi"/>


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