Dasfaust
Member
How would one go about triggering an overlay with Javascript? I could only find one post on this subject, and this is what I've got so far:
	
	
	
		
But I'm getting this error:
	
	
	
		
 
Am I going about this right?
				
			
		HTML:
	
	var $trigger = window.onload;
var $templateHtml = "test";
XenForo.createOverlay($trigger, $templateHtml).load();
		Code:
	
	Uncaught TypeError: Cannot call method 'refresh' of null xenforo.js:191
    c.extend.activate xenforo.js:191
    jQuery.fn.extend.xfActivate xenforo.js:177
    c.extend.createOverlay xenforo.js:199
    (anonymous function)Am I going about this right?
 
 
		 
 
		 
 
		 
 
		