Javascript window location in loop on masterpage -


we have site masterpage. there page policy.aspx.

user has accept policy in order access site resources.

hence put foll. code on masterpage. there boolean variable (var boolval).

if(!boolval)  {    window.location="http://url/policy.aspx";  } 

for new users boolval false. redirected policy.aspx page. since page inherits masterpage, reloads continuously executes window.location again , again infinitely.

can done besides stopping policy.aspx page inherit masterpage?

it's hard know without seeing rest of code, first instinct change code to:

if(!boolval)  {    window.location="http://url/policy.aspx";    boolval = true;  } 

Comments

Popular posts from this blog

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -