Divs not accessible
I'm creating a CMS using Ajax.
So I'm updating the page all the time, but there's a problem.
I'm loading a module into a div.
this div will be filled using an Ajax function.
the update appears on the screen.
the contents of the div should then be:
another function should fill this div.
<div id="text"> </div>
and that's the problem. the div cannot be found, because it just doesn't exist in the source.
Is there a solution to this problem?
Hope someone can help me!
Last edited by LeanderD; 04-14-2007 at 11:05 AM.
Same problem here too...
I am having a similiar problem where I have a DIV InnerHTML loaded from an AJAX call with a form. The HTML DOM does not recognize any of my form objects after they are returned to the page.
The issue seems to be that the DOM only generates the object model based on the original page loading. My research continues, however, it seems the resolution centers around having to "update" the DOM with the objects that are added to the page through an AJAX response.
someone told me I should use createElement instead of innerHTML. My problem is solved somehow, but i didn't use createElement. I've just rewritten my code in another way.
but this is what someone gave me about the createElement code:
it's not much, but i hope it helps!
var moduleDiv = document.getElementById('module');
var textDiv = document.createElement('div');
var imgImage = document.createElement('img');
imgImage.src = 'images/textHeader.png';
By Wildcatbob in forum Web
Last Post: 07-05-2006, 12:47 PM
By Jason Holt in forum Web
Last Post: 05-26-2001, 11:16 PM
Last Post: 04-01-2001, 04:26 AM
Last Post: 11-24-2000, 04:46 AM
By Chris Raethke in forum Web
Last Post: 09-25-2000, 03:07 AM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL