Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9275513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:36:18+00:00 2026-06-18T16:36:18+00:00

Can someone help me to understand the process in the following link, especially part

  • 0

Can someone help me to understand the process in the following link, especially part within onClick:

<a href="http://www.example.com/files/download/files.php?file=my_file.doc" onClick="_gaq.push(['_trackEvent', 'Downloads', 'DOC', this.href.substr(23)]); fn12_reminder(this,''); return false;" rel="nofollow">

I understand that this is simple GA even tracking process, but what I cannot understand is the last part this.href.substr(23) I cannot figure out what this actually does in the entire process?

the js script loaded in the header is of the following nature (I am posting it in full, so that someone with experience can spot a connection, if one exists):

var functions = true;
function fn12_custom_display_notice(theNotice,theClass){
    if(theClass!=''){
        jQuery("#user-notice").removeClass();
        jQuery("#user-notice").addClass(theClass);
        }
        jQuery("#user-notice").html(theNotice).animate({width:'toggle'},250).delay(3000).animate({width:'toggle'},250);
        }
function fn12_custom_display_reminder(theHTML,theDownloadLink){if(typeof jQuery.ui!='undefined'){$("#dialog").attr("title","Please help spread the word").html(theHTML);$("#dialog").dialog({modal:true,width:375,buttons:{"Continue to Download":function(){$(this).dialog("close");window.location=theDownloadLink;}}});}else{window.location=theDownloadLink;}}
function fn12_custom_reminder(aelem,topic){theLink=$(aelem).attr("href");$.ajax({type:"POST",url:"/db/ajax.php",data:"action=reminder&thepath="+theLink+"&topic="+topic,dataType:"json",error:function(){window.location=theLink;},success:function(msg){if(msg.status==1)fn12_custom_display_reminder(msg.html,theLink);else{fn12_custom_display_notice(msg.message,"error");}}});}
function fn12_custom_gplus_callback(theObject){if(theObject.state=='on'){fn12_custom_display_notice("Big thanks!!!",'success');}}

/* jquery_cookie.js Copyright (c) 2006 Klaus Hartl (stilbuero.de), Dual licensed under the MIT and GPL licenses */
jQuery.cookie=function(name,value,options){if(typeof value!='undefined'||(name&&typeof name!='string')){if(typeof name=='string'){options=options||{};if(value===null){value='';options.expires=-1;}
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
expires='; expires='+date.toUTCString();}
var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=name+'='+encodeURIComponent(value)+expires+path+domain+secure;}else{for(var n in name){jQuery.cookie(n,name[n],value||options);}}}else{var returnValue={};if(document.cookie){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(!name){var nameLength=cookie.indexOf('=');returnValue[cookie.substr(0,nameLength)]=decodeURIComponent(cookie.substr(nameLength+1));}else if(cookie.substr(0,name.length+1)==(name+'=')){returnValue=decodeURIComponent(cookie.substr(name.length+1));break;}}}
return returnValue;}};

Any help is highly appriciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T16:36:20+00:00Added an answer on June 18, 2026 at 4:36 pm

    In your example, this.href.substr(23) is equal to files/download/files.php?file=my_file.doc, it’s simply the url associated with the a element.

    • this refers to the current object, the a element.
    • href refers to the element’s attribute.
    • substr(23) takes the substring starting on the 23rd character, to strip the protocol and domain name.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm hoping someone can help me understand a process of recycling a webservice using
Can someone help me understand the following behavior? I'd expect that, since I can
Can someone help me understand how to write this case statement properly its not
(Specifically, I'm using Backbone Model events) Can someone help me understand how javascript events
Can someone help me with creating functions for the following processes? I want to
Can someone help me understand this question? I may have it on my tomorrow
Can someone help me understand this code? # Remove trailing ? RewriteCond %{THE_REQUEST} ?
can someone help me understand this because it's working in as3 but not so
Can someone help me understand how best to model a composition relationship? If for
Can someone help me understand what I'm doing wrong with this method? I'm trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.