There's no "quick" way to do this. One rather inelegant way is to first identify the element within the Ajax page you wish to scroll to using a ID attribute, for example:
Code:
<div>
<img src="windowfiles/bird.jpg" style="float: left; margin: 0 10px 10px 0" />Birds are bipedal, warm-blooded, oviparous vertebrate animals characterized primarily by feathers, forelimbs modified as wings, and hollow bones.
<p>Birds are bipedal, warm-blooded, oviparous vertebrate animals characterized primarily by feathers, forelimbs modified as wings, and hollow bones.
<p>Birds are bipedal, warm-blooded, oviparous vertebrate animals characterized primarily by feathers, forelimbs modified as wings, and hollow bones.
<p>Birds are bipedal, warm-blooded, oviparous vertebrate animals characterized primarily by feathers, forelimbs modified as wings, and hollow bones.
<p id="targetpoint">Birds are bipedal, warm-blooded, oviparous vertebrate animals characterized primarily by feathers, forelimbs modified as wings, and hollow bones.
<p>Birds are bipedal, warm-blooded, oviparous vertebrate animals characterized primarily by feathers, forelimbs modified as wings, and hollow bones.
</div>
Then on your main page when you call dhtmlwindow.open(), follow that code with the code in red that periodically scans the page to see when that element has been added to the page, then scrolls to it:
Code:
ajaxwin=dhtmlwindow.open("ajaxbox", "ajax", "windowfiles/external.htm", "#3: Ajax Win Title", "width=450px,height=300px,left=300px,top=100px,resize=1,scrolling=1")
scrolltimer=setInterval(function(){
try{
if (document.getElementById("targetpoint")){
document.getElementById("targetpoint").scrollIntoView()
clearInterval(scrolltimer)
}
} catch(e){
clearInterval(scrolltimer)
}
}, 100)
Bookmarks