Click to See Complete Forum and Search --> : Advice needed!


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>

Charles
05-05-2009, 12:23 PM
I'm wondering, How does this site work for us who do not use JavaScript at all?

ehime
05-05-2009, 12:26 PM
I'm wondering, How does this site work for us who do not use JavaScript at all?


This site does not work for people with JS disabled.
How many people really do not use JS though? :eek:

skilled1
05-05-2009, 02:00 PM
This site does not work for people with JS disabled.
How many people really do not use JS though? :eek:

Firefox + NoScript is pretty common these days.

ehime
05-05-2009, 02:14 PM
Any chance we can stay on topic here.....

Charles
05-05-2009, 02:21 PM
We are on topic. Make sure your site also works for the JavaScript free and then only impliment the JavaScript for non-MSIE users that do use JavaScript. And then all will be well. And you wont get fired when your client finds out that your site doesn't work for vast numbers of people.

ehime
05-05-2009, 02:44 PM
So a full rewrite is what you recommend...?

Charles
05-05-2009, 02:46 PM
If that's what it takes. You can't build a house without a good foundation.

ehime
05-05-2009, 02:48 PM
link to it now
http://omnisistem.com