javascript - Why continually refresh the page? -


i have page:

link

pass:dizi

i tried make redirection using code:

code jquery:

var url = "http://dizievents.ch/index.php/event/food-n-liquor-dizinvolta-2/"; $(location).attr('href',url); 

on firefox seems ok chrome continually refresh page give.

what think enter infinite while loop.

i not realize why happens ... examples have found code.

can tell me please solution problem? can test site see happens on chrome

thanks in advance!

edit:

i tried so

var url = "http://dizievents.ch/index.php/event/food-n-liquor-dizinvolta-2/"; window.location.href = url; 

you can this:

function getparameterbyname(name) {     name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");     var regex = new regexp("[\\?&]" + name + "=([^&#]*)"),         results = regex.exec(location.search);     return results === null ? "" : decodeuricomponent(results[1].replace(/\+/g, " ")); }  var temp = getparameterbyname("dontredirect"); if(temp != "true") {     var url = "http://dizievents.ch/index.php/event/food-n-liquor-dizinvolta-2/?dontredirect=true";     $(location).attr('href',url); } 

this redirect first time visited. might able provide better answer if tell why want redirect in first place...

getparametersbyname() taken here


Comments