The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
||||
|
||||
JavaScript in Headiclude loops?
It would seem so as after inserting a bit of my own js to the end of the template the site refershes and refershes and refreshe sin an endless fashion.
Whats going wrong and cananyone comment on a place within the code that this js can be placed to allow the styleid to be set automatically upon a users visit, be they guest admin or whatever..?? Code:
var bbcount= 0; while (bbcount<1) { if ((screen.width>=1024) && (screen.height>=768)) { window.location="?styleid=22"; bbcount=bbcount+1; } else { window.location="?styleid=21"; bbcount=bbcount+1; } alert('We are experiencing a Javascript Issue and will be back shortly'); } I take it because the page reloads to set the new id its then re-executing this js over again Would it be wise to set a cookie with a value of 1 or 0 denpendant on if the script is run? That way i could use an if and see if the value is there and if not this would then be excecuted creating a cookie with the "has been run" value ? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|