ehime
05-05-2009, 11:45 AM
Have an issue, rather large one at that. I use XHR for pages
to avoid refresh of the entire shebang. Unfortunately the small
JS program for breadcrumbing I use is completely ignored by IE.
Any recommendations on how I can handle this? I am getting
an endless stream of **** from my company. Since we all know,
IE rules the world :rolleyes: it need to support our less net affluent
brethren. Here's the code I use for breadcrumbing, just incase,
but I think the solution will require a complete rewrite....
function PathWatch(path_change_cb, interval) {
this.path = document.location.href; // Store initial path
this.path_change_cb = path_change_cb; // Store the function to call when the path changes
if (!interval) interval = 400; // Default interval is 400 miliseconds
this.check_new_path = function() {
if (document.location.href != this.path) { // If the location has changed, store the new location
this.path = document.location.href; // and call the callback function
this.path_change_cb();
}
}
// Check for a new path every interval miliseconds
this.oInterval = setInterval(this.check_new_path, interval);
}
called by:
<script type="text/javascript">
function path_changed() {
if (document.location.hash == '#') {
loadDiv('flash.php', 'iContent');
return;
}
elmnt_id = document.location.hash.substr(1).split('/')[0];
request_path = document.location.hash.substr(elmnt_id.length+1);
loadDiv(request_path, elmnt_id);
}
PathWatch(path_changed); // This is important...
</script>
to avoid refresh of the entire shebang. Unfortunately the small
JS program for breadcrumbing I use is completely ignored by IE.
Any recommendations on how I can handle this? I am getting
an endless stream of **** from my company. Since we all know,
IE rules the world :rolleyes: it need to support our less net affluent
brethren. Here's the code I use for breadcrumbing, just incase,
but I think the solution will require a complete rewrite....
function PathWatch(path_change_cb, interval) {
this.path = document.location.href; // Store initial path
this.path_change_cb = path_change_cb; // Store the function to call when the path changes
if (!interval) interval = 400; // Default interval is 400 miliseconds
this.check_new_path = function() {
if (document.location.href != this.path) { // If the location has changed, store the new location
this.path = document.location.href; // and call the callback function
this.path_change_cb();
}
}
// Check for a new path every interval miliseconds
this.oInterval = setInterval(this.check_new_path, interval);
}
called by:
<script type="text/javascript">
function path_changed() {
if (document.location.hash == '#') {
loadDiv('flash.php', 'iContent');
return;
}
elmnt_id = document.location.hash.substr(1).split('/')[0];
request_path = document.location.hash.substr(elmnt_id.length+1);
loadDiv(request_path, elmnt_id);
}
PathWatch(path_changed); // This is important...
</script>