News:

Wondering if this will always be free?  See why free is better.

Main Menu

Incorporating background switcher code

Started by samborabora, March 26, 2014, 08:14:28 PM

Previous topic - Next topic

vkot

 I have narrowed down the problem of my styleswitcher code to this:

window.onload = function(e) {
  var cookie = readCookie("style");
  var title = cookie ? cookie : getPreferredStyleSheet();
  setActiveStyleSheet(title);
}

When the above is NOT present in the javascript, everything works normally. In fact, just the existence of
window.onload = function(e) {
}

makes the PM recipient autosuggest and the PM pop-up notification not work.

I cannot understand how this is conflicting with the autosuggest script (http://media.simplemachinesweb.com/smf/default/scripts/suggest.js) and the PM Pop-up script. Why a window.onload call stops these specific scripts from working? Can someone help?

(I'm sorry if I shouldn't post to other person's thread, but I have posted my code only in this thread.)
For specialized SMF installation/customization, Web Development, Linux Server Administration, click here.
Για εξειδικευμένες υπηρεσίες στα παραπάνω, πατήστε εδώ.

Advertisement: