Hi!
I have problems to open an HTML into a DIV.
Please, enter to: http://www.guif.net/menu/hola.html and now, go to http://www.guif.net/menu/_index.html > Menú (at right, top) and click to the first link.
The content of the first web is not included correctly. Why????
|
Invasive contributor
|
|
| 27Jul2008,08:38 | #2 |
|
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************ ************************* Code:
div id="sub-panel"><a href="#" id="toggle2"><span>Información</span></a></div> your # is linking to anything within the site for example Code:
<A HREF="anameexample.html#test">test</A> 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 |
|
Go4Expert Founder
|
![]() |
| 27Jul2008,10:09 | #3 |
|
Just use the innerHTML to put anything into Div.
|
|
Skilled contributor
|
|
| 27Jul2008,16:27 | #4 |
|
Help About InnerHTML
Code:
http://www.tizag.com/javascriptT/javascript-innerHTML.php |
|
Go4Expert Member
|
|
| 28Jul2008,12:24 | #5 |
|
why is not possible use:
Code:
<a href="javascript:ajaxpage('webs/hola.html', 'section2');">Simplesection</a>
If I put Code:
<A HREF="anameexample.html#test">test</A> |
|
Go4Expert Member
|
|
| 28Jul2008,12:34 | #6 |
|
here is the code of javascript that i use to open a link into a DIV:
Code:
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){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
page_request.onreadystatechange=function(){
loadpage(page_request, containerid)
}
page_request.open('GET', url, true)
page_request.send(null)
}
function loadpage(page_request, containerid){
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
document.getElementById(containerid).innerHTML=page_request.responseText
}
function loadobjs(){
if (!document.getElementById)
return
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=document.createElement('script')
fileref.setAttribute("type","text/javascript");
fileref.setAttribute("src", file);
}
else if (file.indexOf(".css")!=-1){ //If object is a css file
fileref=document.createElement("link")
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", file);
}
}
if (fileref!=""){
document.getElementsByTagName("head").item(0).appendChild(fileref)
loadedobjects+=file+" " //Remember this object as being already added to page
}
}
}
|
|
Go4Expert Member
|
|
| 29Jul2008,21:24 | #7 |
|
anybody help me please?
|
|
Banned
|
|
| 20Jan2009,14:19 | #8 |
|
Hi
![]() i really dont know what your asking but i found this go it will very nice and thank u...
|
|
Go4Expert Founder
|
![]() |
| 20Jan2009,14:34 | #9 |
|
BrentAston, Please confine links to signatures only and do not include them into posts.
|
|
Contributor
|
|
| 30Jan2009,11:42 | #10 |
|
what you want to say. if you want to know about <div> tag then you can see detail and use of <div> tag in w3schools.com.
|


