473,385 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

AJAX Problem - Firefox and IE6 issue

I have just put 4 different ajax bits on this page:
http://jimpix.co.uk/default-ajax.asp

The ajax spits out chunks of images / news content, and users can view
the chunks via next / prev links.

When I first view the page in Firefox, there is a short delay while
the content first loads in the ajax sections.

When I first view the page in IE6, none of the ajax content appears to
start with. It only appears if I click a 'next' link.

Initially the body tag contained this, to fire off the 4 relevant
functions:
<body id="root" onload="sendRequest(MyCurrentVar + ',' +
MyCurrentCat); sendPhotoRequest(MyPhotoVar);
sendNewsRequest(MyNewsVar); sendWPRequest(MyWPVar)">

I then got rid of that, and used this instead:

window.onload = function()
{
sendRequest(MyCurrentVar + ',' + MyCurrentCat)
sendPhotoRequest(MyPhotoVar)
sendNewsRequest(MyNewsVar)
sendWPRequest(MyWPVar)
}

But I get the same result regardless.

Any advice much appreciated.

Thanks

Mar 12 '08 #1
1 1806
VK
On Mar 12, 9:06 pm, violinandvi...@fastmail.fm wrote:
I have just put 4 different ajax bits on this page:http://jimpix.co.uk/default-ajax.asp

The ajax spits out chunks of images / news content, and users can view
the chunks via next / prev links.

When I first view the page in Firefox, there is a short delay while
the content first loads in the ajax sections.

When I first view the page in IE6, none of the ajax content appears to
start with. It only appears if I click a 'next' link.

Initially the body tag contained this, to fire off the 4 relevant
functions:
<body id="root" onload="sendRequest(MyCurrentVar + ',' +
MyCurrentCat); sendPhotoRequest(MyPhotoVar);
sendNewsRequest(MyNewsVar); sendWPRequest(MyWPVar)">

I then got rid of that, and used this instead:

window.onload = function()
{
sendRequest(MyCurrentVar + ',' + MyCurrentCat)
sendPhotoRequest(MyPhotoVar)
sendNewsRequest(MyNewsVar)
sendWPRequest(MyWPVar)

}

But I get the same result regardless.

Any advice much appreciated.
Are these send*Request sync or async? Do not forget that the page is
not displayed until the first execution break in onload handler. If
onload one starts a long operation, it may take a lot of time before
the initial blank screen will be repainted by the actual content. I am
not saying that it is your problem but it is a very often problem for
many current script-intensive sites. In my solution I am always using
onload over overlay to release the context so to let the page to be
initially drawn:

<script type="text/javascript">

function init() {
// do your stuff
}

function releaseContextAndInit() {
window.setTimeout('init()',10);
}

window.onload = releaseContextAndInit;
</script>

P.S. That excludes situations when one indeed doesn't want to display
the page until all its content is fully prepared.
Mar 12 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: evgenyg | last post by:
Hello ! We have the following situation - when Ajax request is sent what's being returned by the server is usually an XML (which is used for DOM updates) but sometimes it's HTML which is a whole...
4
by: ext237 | last post by:
Simple ajax call seems to have some issues in Firefox. The "onComplete:" is called BEFORE the response is returned by the call. Is there a coding issue or a work around? var ajax = new...
17
by: Arjen | last post by:
Hi, I want to reload 2 divs at one click. Ive tried: <a href = "javascript:void(0);"...
2
by: germ | last post by:
doing a simple page webmethod call an a page via PageMethods works fine in ie7 & opera9 the same call on firefox ( and I assume netscape ) generates the following error : Error: " nsresult:...
0
by: jrnail23 | last post by:
I have a user control which contains an UpdatePanel, which contains a MultiView inside, with a GridView in one of the views. In my GridView, I have a ButtonField which is supposed to trigger a...
2
by: awi | last post by:
Hi Everyone, I'm facing a unique problem when testing with FireFox (at least, I think its unique). Here is the situation: I have a page setup that looks like this: <form id="abcForm"> <div...
3
by: dmorand | last post by:
I have a page where I'm using ajax to retrieve some employee info when a user clicks a "Retrieve Employee Info" button. The issue I'm having is that when the user updates the employee info,...
6
by: raknin | last post by:
Hi I am running ajax call to my appache local server on my development server, which is also my testing server, I run the site from the server (the server running php,mysql), what I get back is a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.