PDA

View Full Version : Ajax Pageloader doesn't work offline?



Jackboy
15-11-2008, 11:56 AM
I have been making my cousin a site on my computer and i used the ajax page loader. It works in ie6, firefox and all other browsers but in ie7 it doesn't work.

Its the pageloader from dynamic drive.. But the thing is, when i download the script and put it on my machine it dnt work either, yet it works when i browse it online.

Anyone know how to fix this problem?

Decode
15-11-2008, 11:58 AM
I think IE limits offline pages, put it in your localhost so it thinks its a page off the web.

Jackboy
15-11-2008, 12:09 PM
Na i cba with that.

That's really annoying....

L?KE
15-11-2008, 07:06 PM
Lol, how is moving it to htdocs annoying :P

Make it a shortcut and add a keyboard shortcut, helps :P

Jackboy
15-11-2008, 09:51 PM
No u plonka, i meant my cousins school doesn't have localhost.... ?

But thanks for telling me about Cntrl c and cntrl v, thats really helped me, +REP

:l

I just wanna know if theres a way to get round this problem

Calon
15-11-2008, 10:58 PM
No u plonka, i meant my cousins school doesn't have localhost.... ?

But thanks for telling me about Cntrl c and cntrl v, thats really helped me, +REP

:l

I just wanna know if theres a way to get round this problem
Download FIREFOX from the computer you're on, chuck it on a portable device, send it to your cousin, your cousin has firefox.. Shazzam!

Jackboy
16-11-2008, 12:16 AM
Download FIREFOX from the computer you're on, chuck it on a portable device, send it to your cousin, your cousin has firefox.. Shazzam!

He has firefox.

Also Calon should i use $_GET for my pages? Or is it being deprecated?

CS-dude
16-11-2008, 06:27 AM
Hey there,


EDIT:
I reread your first post, it seems a missed the point a bit first time round. When run locally internet explorer will default to its Intranet security policy (which is stricter than what it uses on the web) You will usually get a pop-up / notification asking if you would like to allow the script to run when this happens. At this point its normally possible to add an exception if need be.
I haven't used IE in a while, so sorry if I'm not being very specific. :)

----

For a simple ajax page loading mechanism i would suggest something along the lines of


<script>
function LoadPage(page,usediv) {
// Set up request varible
try {xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP");} catch (e) { alert("Error: Could not load page.");}
//Show page is loading
document.getElementById(usediv).innerHTML = 'Loading Page...';
//scroll to top
scroll(0,0);
//send data
xmlhttp.onreadystatechange = function(){
//Check page is completed and there were no problems.
if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {
//Write data returned to page
document.getElementById(usediv).innerHTML = xmlhttp.responseText;
}
}
xmlhttp.open("GET", page);
xmlhttp.send(null);
//Stop any link loading normaly
return false;
}
</script>
source: http://www.habboxforum.com/showthread.php?t=342560

Dynamic drive tend to hold errors due to be wildly over complicated where a very simple solution can do much the same job.

Hope that helps,
Cs-Dude

Jackboy
16-11-2008, 12:12 PM
Nope, it just says "Loading page" for ages and doesn't load....

Want to hide these adverts? Register an account for free!