What got my attention was the fact that the same person had responded to their own message, asking again for help. This is known as a 'bump' and is fine as long as your original post was clear and went unanswered for a few days.
Using stylized and/or colored text should be reserved for clarity in code or instructions, and there only as a shortcut. You should be prepared to later explain, just in plain words, what the style or color meant. The reason being that once you deviate from normal text, you can no longer be assured that any given browser will see it in the way it was intended. It may even be illegible.
Now, on to your new question -
I am assuming you mean the link(s) to kunstenaars.htm from an artist's page. If you didn't have the scrolling inset division (tekst), you could use a named anchor and may still be able to do so, in some fashion but, I doubt it. Setting the scrollTop value of the tekst division will work in most current, javascript enabled browsers:
Code:
document.getElementById('tekst').scrollTop=100;
Where 100 is the approximate number of pixels scrolling you want the division to do. Passing that information from the artist's page back to the kunstenaars.htm page is easy but using it is a little tricky, depending upon what else is going on, script/wise on the kunstenaars.htm page. To pass the information back with the link(s) to kunstenaars.htm on an artist's page, use:
Code:
<a href="kunstenaars.htm?scrollvar=100">kunstenaars</a>
or similar. Once again, 100 is the amount of scroll you want to pass along.
Putting this in the head of kunstenaars.htm:
Code:
<script type="text/javascript">
function scrolldiv(){
document.getElementById('tekst').scrollTop=parseInt(get('scrollvar'));
}
function get(key_str) {
var query = window.location.search.substr(1);
var pairs = query.split("&");
for(var i = 0; i < pairs.length; i++) {
var pair = pairs[i].split("=");
if(unescape(pair[0]) == key_str)
return unescape(pair[1]);
}
return null;
}
if (location.search&&get('scrollvar')!=null)
if ( typeof window.addEventListener != "undefined" )
window.addEventListener( "load", scrolldiv, false );
else if ( typeof window.attachEvent != "undefined" )
window.attachEvent( "onload", scrolldiv );
else {
if ( window.onload != null ) {
var oldOnload = window.onload;
window.onload = function ( e ) {
oldOnload( e );
scrolldiv();
};
}
else
window.onload = scrolldiv;
}
</script>
should pick up the value and use it without interfering with most other scripts, if any, on the page.
Bookmarks