Load javascript in app engine
Posted
by
user624392
on Stack Overflow
See other posts from Stack Overflow
or by user624392
Published on 2011-03-12T15:53:10Z
Indexed on
2011/03/12
16:10 UTC
Read the original article
Hit count: 234
I got so confused loading javascript in app engine. I am using django template. In my base html file. First I can't load my downloaded jquery from local say d:/jquery.js
like
<script src="d:\jquery.js" type="text/javascript" ></script></head>,
This line is in my base html file. It works when I load jquery from remote. Like
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"type="text/javascript" ></script></head>
I dont know why. Second, I can't load my own-created javascript to my html file, say I create a javascript like layout. Js and I try to load it like this in my child html file, which, by the way, inherits from the base html.
<body><script src="layout.js" type="text/javascript"></script></body>,
And it doesn't work at all, the only way it works I have tried is that I put the actual javascript in the body of my base html file. Like
<body><script>
$(document).ready(
$("#yes"). Click(function() {
$("#no"). Hide("slow");
}));
</script>
I dont know why either... Any help?
© Stack Overflow or respective owner