Hi this is a newbie alert! This may seem really basic to most, but I am a total beginner, so please don't laugh, or gif me false info...lol I will use it.
I have an ajax container loading on my site http://www.defyinggravity.co.za/home.html
In Firefox the navigation works perfectly, but in IE, NS and Opera when I scroll to the bottom of a page and then select a new page to navigate to, then the page new page loads from the previous pages state (at the bottom or middle, where ever I had scrolled to)
here is the code for the ajax, can anyone help please? - var loadedobjects=""
-
var rootdomain="http://"+window.location.hostname
-
-
function ajaxpage(url, containerid){
-
var page_request = false
-
if (window.XMLHttpRequest) // if Mozilla, Safari etc
-
page_request = new XMLHttpRequest()
-
else if (window.ActiveXObject){ // if IE
-
try {
-
page_request = new ActiveXObject("Msxml2.XMLHTTP")
-
}
-
catch (e){
-
try{
-
page_request = new ActiveXObject("Microsoft.XMLHTTP")
-
}
-
catch (e){}
-
}
-
}
-
else
-
return false
-
page_request.onreadystatechange=function(){
-
loadpage(page_request, containerid)
-
}
-
page_request.open('GET', url, true)
-
page_request.send(null)
-
}
-
-
function loadpage(page_request, containerid){
-
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
-
document.getElementById(containerid).innerHTML=page_request.responseText
-
}
-
-
function loadobjs(){
-
if (!document.getElementById)
-
return
-
for (i=0; i<arguments.length; i++){
-
var file=arguments[i]
-
var fileref=""
-
if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding
-
if (file.indexOf(".js")!=-1){ //If object is a js file
-
fileref=document.createElement('script')
-
fileref.setAttribute("type","text/javascript");
-
fileref.setAttribute("src", file);
-
}
-
else if (file.indexOf(".css")!=-1){ //If object is a css file
-
fileref=document.createElement("link")
-
fileref.setAttribute("rel", "stylesheet");
-
fileref.setAttribute("type", "text/css");
-
fileref.setAttribute("href", file);
-
}
-
}
-
if (fileref!=""){
-
document.getElementsByTagName("head").item(0).appendChild(fileref)
-
loadedobjects+=file+" " //Remember this object as being already added to page
-
}
-
}
-
}
-
-
function MM_preloadImages() { //v3.0
-
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
-
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
-
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
-
}
-
-
function MM_findObj(n, d) { //v4.01
-
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
-
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
-
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
-
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
-
if(!x && d.getElementById) x=d.getElementById(n); return x;
-
}
-
-
function MM_swapImgRestore() { //v3.0
-
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
-
}
-
-
function MM_swapImage() { //v3.0
-
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
-
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
-
}
2 2155
Tx a stack will give it a bash
Have a great day!
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Yarco |
last post by:
I want to use "Ajax" to create my web for hobby.
But i don't know whether "Ajax" is mature...
And what about with php? Someone have experience on it?
....
|
by: Trip |
last post by:
Please if someone can help me !!!
I need client and server code(principle based on AJAX) for next problem:
i have 3 <select> tags on html page.(it must be NO page reload(callback)
only select(controles) regeneration !!!)
In the first <select> goes countries, which must be pulled from some kind
of database (whichever you want).
after that if i select some country, second <select> must be filled with
regions of that country, and when i...
|
by: Sabin.A.K, Bangalore |
last post by:
Seen that AJAX makes the Python interfaces bit more User friendly. The
Page refresh problems for the huge applications has slashed down
extensively. Page reload has been faded out and eventually the Server
responses been printed out in the same page itself. The trendy XML HTTP
Request has really struck the way developers had adopted with the user
interfaces. But the major issuse are yet to be solved..
1. Changing state with links (GET...
|
by: Steve |
last post by:
I need to build a very dynamic client and would be interested in knowing the pros and
cons of using JSF and Ajax to accomplish this.
Thanks.
Steve
|
by: arunprabu |
last post by:
Hi,
I have a problecm with the AJAX request in my webpage. I have some
filters on top of the page. I have a submit button and an empty div
below the filters.
Some of the filters have ajax requests to update the content within the
filters. For example, I have 2 drop downs, one for state and another
for country. When I select a country in the country drop down, an ajax
request is sent to fetch appropriate list of states and updates the
| |
by: paladin.rithe |
last post by:
I'm looking to use AJAX as part of the login system for a project, but
I'm not finding what I'm looking for. I've seen the example of how to
do an AJAX login, but that isn't really what I want.
What I want to do is use XMLHttpRequest to send the request, and send
back any errors (no username, bad password, whatever). But, if it is a
valid account, I'd like it to login to the system. I haven't been able
to find anything like that, and...
|
by: empiresolutions |
last post by:
Im using this script, http://www.captain.at/howto-ajax-form-post-get.php, to make an ajax request to php via a drop-down (DD) select. This works fine. Then using this script, http://www.dhtmlgoodies.com/index.html?whichScript=ajax-dynamic-content, i request to show a php page with other form elements in it. These elements are determined by what the first DD of the first request (captain.at) sets a variable to. This works fine.. only the first...
|
by: =?Utf-8?B?RGFuaQ==?= |
last post by:
Hi,
Trying to create a master page that holds a menu, and the menu switches
between pages in the site. 2 problem arrosed:
a. When I navigate from page to page (all AJAX Web Forms, with the Master
pages as their master...) the entire page is refreshed - also the menu which
belongs to the master, how can I fix it - so only the inside content will be
refreshed ?
|
by: christian |
last post by:
Hello
I use a AJAX refresh script on a page to test a $var state
<div>
<?
include ("include/refr.inc.php");
//ajax script for reload
require ("bd_inc.php");
//test the line state buzy or free
$st = mysql_query("SELECT linestate FROM broad WHERE num='40'");
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |