Problems to open HTML into a DIV

guif's Avatar
Go4Expert Member
I have problems to open an HTML into a DIV.
Please, enter to: and now, go to > Menú (at right, top) and click to the first link.
The content of the first web is not included correctly. Why????
XXxxImmortalxxXX's Avatar
Invasive contributor
i really dont know what your asking but i found this go to the /_index.html site

and look at the source code u see this

**********************************CODE************ *************************
div id="sub-panel"><a href="#" id="toggle2"><span>Información</span></a></div>
**********************************END************* *************************
your # is linking to anything within the site

for example

<A HREF="anameexample.html#test">test</A>
maybe you should have the webpage name then add the # to it

dunno if it helps but yea im sry i couldnt provide more information

Last edited by XXxxImmortalxxXX; 27Jul2008 at 08:42.. Reason: lol forgot to add the [/code] at the end of the code lol
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Just use the innerHTML to put anything into Div.
faizulhaque's Avatar, Join Date: May 2008
Skilled contributor
Help About InnerHTML
guif's Avatar
Go4Expert Member
why is not possible use:
<a href="javascript:ajaxpage('webs/hola.html', 'section2');">Simplesection</a>

If I put
<A HREF="anameexample.html#test">test</A>
the page is open in a new windows but not into my DIV....
guif's Avatar
Go4Expert Member
here is the code of javascript that i use to open a link into a DIV:

var loadedobjects=""
var rootdomain="http://"+window.location.hostname

function ajaxpage(url, containerid){
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
catch (e){
page_request = new ActiveXObject("Microsoft.XMLHTTP")
catch (e){}
return false
loadpage(page_request, containerid)
}'GET', url, true)

function loadpage(page_request, containerid){
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))

function loadobjs(){
if (!document.getElementById)
for (i=0; i<arguments.length; i++){
var file=arguments[i]
var fileref=""
if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding
if (file.indexOf(".js")!=-1){ //If object is a js file
fileref.setAttribute("src", file);
else if (file.indexOf(".css")!=-1){ //If object is a css file
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", file);
if (fileref!=""){
loadedobjects+=file+" " //Remember this object as being already added to page
The html is open, but not's running the css and the javascripts of my differents htmls...
guif's Avatar
Go4Expert Member
anybody help me please?
BrentAston's Avatar

i really dont know what your asking but i found this go it will very nice and thank u...
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
BrentAston, Please confine links to signatures only and do not include them into posts.
skp819's Avatar
what you want to say. if you want to know about <div> tag then you can see detail and use of <div> tag in