The current value of getvar is 0 <script type="text/javascript">var value ={_$getvar|0};value++;document.write('<a href="'+'<xt id="url"/>'+'?getvar='+value+'">VALUE '+value+'</a>')</script> This javascript uses both get variables and xtfunctions