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
Post a Comment