Connecting Tech Pros Worldwide Forums | Help | Site Map

XML http request object

Newbie
 
Join Date: Mar 2006
Posts: 10
#1: Mar 1 '06
Hello, some time ago I've created a site in asp in combination with the XML http request object, this way I was able to load content from a database into div elements, this way there is no need to reload a whole page wich speeds up the website's page loading time dramatically.

I think it is a superb solution, also the content loaded in the div elements cannot be seen when viewing the source code of a page.

But...I have found out, it has a problem when using javascript within those div elements, javascript won't work when content loaded within the div element using the xml http request object.

Does anyone know if there is a way to make it work,
javascript loaded from a database within a div element using xml http request object?

Thanks for all help in advance :)

Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,137
#2: Dec 9 '08

re: XML http request object


Are you getting any JavaScript error messages?
Could you please post your JavaScript code (please remember to use code tags when posting code snippets)

-Frinny
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,664
#3: Dec 10 '08

re: XML http request object


Quote:

Originally Posted by Centaury View Post

I think it is a superb solution, also the content loaded in the div elements cannot be seen when viewing the source code of a page.

unless the user knows of firebug or the web developer plugins.

javascript is executed on page load. any other scripts that may be included later (by ajax) have to be executed separately by eval() (see http://bytes.com/topic/javascript/an...oaded-into-div)

regards
Reply