469,962 Members | 2,778 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,962 developers. It's quick & easy.

Javascipt Not Working in Ajax Generated Parts of site

i have js calendar which works fine bun when i inster SAME html+javascript to my index file but generated in ajax SAME calendar code do not work.... old ones continue working... why javascript is not working in ajax generated parts? help me plz, what can i do?
Nov 22 '06 #1
4 2412
Close the head tag before starting Javascript ie,
<head runat="server"></head>
<script language=JavaScript>

//body

</script>
Nov 23 '06 #2
it's closed...

i mean i have a smal little part site generated in something.php (HTML and Javascript) and then inserted it into index page using ajax... scripts generated in something.php do not work... on the other hand if i include this php file everything will work fine...
Nov 23 '06 #3
i discovered that everything between <script> tags do not work in ajax generated filas but they work in HTML... for example:

[HTML]
This do NOT works with ajax:
<script>alert('asd');<script>

Works Fine:
<a href='#' onClick='alert("asd")'>asd</a>
[/HTML]

haw can i make script tags work? plz help
Nov 24 '06 #4
when I closed the <head> before opening <script> the scripts working fine,I dont know why it isnt working in ur case.Like this.Try once more.

Expand|Select|Wrap|Line Numbers
  1. <head></head>
  2. <script>
  3. alert('asd');
  4. </script>
  5.  
Nov 25 '06 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by Nick | last post: by
10 posts views Thread by Bugsy | last post: by
9 posts views Thread by smk17 | last post: by
3 posts views Thread by David Prentice | last post: by
22 posts views Thread by tomb | last post: by
2 posts views Thread by KBS Tours Development | last post: by
7 posts views Thread by Joe | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.