-
ajax-externalhtml-div issues
Hi, im trying to do some experimental ajax/javascript/dhtml work
based on a dynamic drive tutorial.
http://www.dynamicdrive.com/dynamici...tent.htm#combo
my problem is that i cannot find ANY information ANYWHERE AT ALL
on how to select a <div> from the EXTERNAL html page beingloaded.
basically i dont want to load an entire page. i only want to load specified
<div>s into other div containers.
can anyone help me?
I have narrowed it down to the following pieces of code:
function loadpage(page_request, containerid, originid){
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
document.getElementById(containerid).innerHTML=page_request.responseText
}
the LAST line document.getElementById(containerid) works and publishes
the entire html page (external.htm) into containerid in the index.htm page
BUT whenever i try to add ANY code to:
innerHTML=page_request.responseText
such as
innerHTML=page_request.getElementById(originid).responseText
or
innerHTML=page_request.responseText.getElementById(originid)
or
innerHTML.getElementById(originid)=page_request.responseText
NOTHING WORKS!!!
i'd be super appreciateive of anyone who might be able to guide me as to how to format my syntax so this can be done.
I know my originid and containerid variables are passing b/c i alerted them and they DEFINITELY work. it just has to do with the fact that i cant find any documentation on the proper way to do this (internet and like 4 books today scoured!)
thanks in advance to anyone out there 
mk
Similar Threads
-
By geekdesign in forum AJAX
Replies: 2
Last Post: 09-16-2007, 08:38 PM
-
By blundersen in forum Java
Replies: 1
Last Post: 03-31-2007, 04:40 PM
-
Replies: 0
Last Post: 04-20-2006, 01:58 PM
-
By dhruba.bandopad in forum ASP.NET
Replies: 0
Last Post: 04-13-2006, 12:18 PM
-
Replies: 0
Last Post: 02-09-2006, 02:26 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|