tags:

views:

30

answers:

2

I have the following structure:

-uploadpage.html
-index.php
-resources
    -jquery-1.4.2.min.js

On my index.php, I get the contents then output uploadpage.html through this code:

$output = file_get_contents("uploadpage.html");
echo $output;

My upload.html has the javascript at the bottom:

<script type="text/javscript" src="./resources/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
 $(document).ready(
     function() {
      callSomething();
     }
 );
    function callSomething() {return true;}
</script>

However this results in an error "$ is not defined" which means that the jquery js file is not loaded. Any ideas?

+1  A: 
jquery.1.4.2.min.js
jquery-1.4.2.min.js

If that was just a typo in your question, open up Firebug and look at the "Net" tab to see what the browser is actually trying to load, and what happens when it tries to do that.

Matti Virkkunen
Yes, it is only a typo. Under net tab no js is being requested
mives
+1  A: 

change:

type="text/javscript"

to:

type="text/javascript"
webbiedave
@mives: Was this another typo in your question?
Matti Virkkunen
You know when you have one of those major facepalm moments? I just had it. I did not see that freaking typo on my code. WTF. It is now fixed. D'oh!
mives