R
ragtek
Guest
I think i'm having a scope problem and i don't know why
js file1:
var foo{
test:true,
};
js file2:
why can't i access foo now???
I've tried loadJs and scriptLoader.LoadScript, and iwth $.content and without, ... but i had no success

js file1:
var foo{
test:true,
};
js file2:
Code:
XenForo.Ragtek_PostBox = function($link)
{
$link.click(function(e)
{
e.preventDefault();
var link = this.href;
var $box = $('<input type="textbox" value="' + this.href + '" class="textCtrl" size="80"/>');
$box.click(function(e){
this.select();
XenForo.loadJs('js/ragtek/foo.js', $.context(this));
// XenForo.loadJs('js/ragtek/foo.js');
// XenForo.scriptLoader.loadScript('js/ragtek/foo.js', $.context(this));
//how can i access now foo???
why can't i access foo now???
I've tried loadJs and scriptLoader.LoadScript, and iwth $.content and without, ... but i had no success
