legend.raju
07-21-2010, 10:22 AM
Hey, my site's setup is like this
<html>
<div> content </div>
<a id="a1"> a </a>
<script>
get("a1").onclick = load "response" to content div innerHTML;
get("a2").onclick = load "a diff response" to content div innerHTML;
</script>
</html>
The file that is loaded is in a sub folder ./contents/sample/index.php
now in that "sample/index.php" I included something like this
<a id="a1">click here</a>
This is not working ..!
Im using the jquery.load() function to call the ajax page. As far as my knowledge, by loading ajaxed content to innerHTML, css and javascript should work if defined in the main index file and not in the file being fetched.
<html>
<div> content </div>
<a id="a1"> a </a>
<script>
get("a1").onclick = load "response" to content div innerHTML;
get("a2").onclick = load "a diff response" to content div innerHTML;
</script>
</html>
The file that is loaded is in a sub folder ./contents/sample/index.php
now in that "sample/index.php" I included something like this
<a id="a1">click here</a>
This is not working ..!
Im using the jquery.load() function to call the ajax page. As far as my knowledge, by loading ajaxed content to innerHTML, css and javascript should work if defined in the main index file and not in the file being fetched.