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

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -