0

I've been banging my head against the wall trying to figure out why Jquery won't load. It and Jquery UI are being accessed off Google API so it should work fine, but I get 'jquery is undefined' messages.

All I can figure is it's a conflict with some of the other scripts?

Source it and see if you can help out. Thanks.

http://marianoagency.com/intranet/trial.html

4 Answers 4

1
<!-- JS Functions

is not valid javascript in functions.js

try // <!-- JS Functions

Sign up to request clarification or add additional context in comments.

1 Comment

Sometimes when you've been looking at something too long you just overlook the easy stuff. Thanks so much.
1

In your http://marianoagency.com/intranet/scripts/functions.js file you have:

<!-- JS Functions

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function window(page,tl,wd,ht) {
OpenWin = this.open(page, tl, "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,width="+wd+",height="+ht);
}

function window2(page) {
OpenWin = this.open(page, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,width=500,height=300");
}

//-->

Those aren't legal JavaScript comment tags. Use /* and */ instead if you want to comment out the entire block of code, or // per line.

Comments

1

In addition to @Joe Tuskan's answer, you have a very suspicious piece of code here:

function window(page,tl,wd,ht) {
OpenWin = this.open(page, tl, "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,width="+wd+",height="+ht);
}

Calling a function window is a really bad idea, because it will conflict with the global window object. It isn't strictly speaking a reserved word in the grammatical sense, but it might as well be.

Comments

0

You have the jQuery loading after the plugin/personal scripts.

also here is a common fallback if Google fails:

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
if (typeof jQuery == 'undefined') {
    document.write(unescape("%3Cscript src=\"http://trackmyclosing.net/ci/plugins/js/jquery-1.7.2.js\" type='text/javascript'%3E%3C/script%3E"));
}
</script>

2 Comments

Why would he get "jquery is undefined" if his link to jQuery on Google is fine? If the problem was the order of the scripts he'd get a different error.
if he's using jQuery('#id') before it is loaded, wouldn't it be undefined?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.