473,795 Members | 3,358 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IE page rendering issue (Wait message)

tusovka
23 New Member
Because Firefox and IE render web pages differently, I cant get the same results.
I working with many embedded tables that contain javascript functionality inside.

What I have is a table that contains radio buttons. Once the user selects a button, I use the onClick functionality to generate 2 dynamic selectors that are inserted once results come back from DataBase.

I want to display a simple message (Query in progress) until the selectors are generated (2sec). To display the message:
document.getEle mentById('waitQ uery').style.di splay='';
and once the selectors are build remove message:
document.getEle mentById('waitQ uery').style.di splay='';

This works in Firefox, but not in IE. Why, because the table is not complete, that is the selectors are not done yet. So IE does not show the message either. Once the selectors are created, IE executes the Javascript, but so fast that message is not seen, plus in does not make sense to show the message after the wait time passed.

Please, help... I just want a simple message to be Displayed in IE while query in progress...
May 12 '09
25 4690
gits
5,390 Recognized Expert Moderator Expert
you find a quick intro here and here ... at the bottom of the page there are more links that could get you on track ...

kind regards
May 14 '09 #11
Frinavale
9,735 Recognized Expert Moderator Expert
@gits
Yes it was a question (note the question mark) :)
I should have probably just researched it....but was lazy yesterday.
May 14 '09 #12
gits
5,390 Recognized Expert Moderator Expert
yes ... i know and i misunderstood it as a question for whether the OP would use AJAX or not and as it turned out now he isn't at the moment ... so that would explain the behaviour of the browser ... :)
May 14 '09 #13
tusovka
23 New Member
For some reason I could not post a reply. So if later you see 3 same replies just ignore.


I located the XMLHttpRequest( ) function.
Expand|Select|Wrap|Line Numbers
  1. function techPage(A, B, C, D, E, F) {
  2.     var oRequest = new XMLHttpRequest();
  3.     var sURL= \"http://\"+self.location.hostname+E+D+\".php?A=\"+A+\"&B=\"+B+\"&F=\"+F;
  4.     //alert(sURL);
  5.     //document.write(sURL);
  6.     oRequest.open(\"GET\",sURL,false);
  7.     oRequest.setRequestHeader(\"User-Agent\",navigator.userAgent);
  8.     oRequest.send(null)
  9.     if (oRequest.status==200)  {
  10.       return(oRequest.responseText);
  11.       //alert(oRequest.responseText);
  12.     } else {
  13.         alert(\"Error executing XMLHttpRequest call!\");
  14.       }
  15.   } 
----

Any suggestions on what my next step could be in finding a solution to my message issue in IE???
May 14 '09 #14
Frinavale
9,735 Recognized Expert Moderator Expert
@tusovka
Hehe, yeah I cleaned up your duplicate posts.
The reason your reply wasn't showing up is because your post contained code that the forum filter thought could be dangerous. One way to avoid this problem is to post your code in code tags... but some posts are filtered even with code tags. If it happens again just contact a moderator and they'll fix it for you :)
May 14 '09 #15
acoder
16,027 Recognized Expert Moderator MVP
To make it asynchronous, change line 6 to:
Expand|Select|Wrap|Line Numbers
  1. oRequest.open(\"GET\",sURL,true);
May 14 '09 #16
tusovka
23 New Member
@acoder
I tried changing the 3rd argument to (true) from false and my code fails. I still dont know why.
May 15 '09 #17
gits
5,390 Recognized Expert Moderator Expert
yes ... you don't use a callback since you rely currently on a sync process ... try the following in addition to the true-param:

Expand|Select|Wrap|Line Numbers
  1. oRequest.onreadystatechange = function() {
  2.     if (oRequest.readyState == 4 && oRequest.status == 200)  {
  3.         return(oRequest.responseText);
  4.         //alert(oRequest.responseText);
  5.     } else {
  6.         alert(\"Error executing XMLHttpRequest call!\");
  7.     }
  8. }
kind regards
May 15 '09 #18
tusovka
23 New Member
Here is the output:

1)First, the tech selector <span> displays --> undefined
2)Second, I get the alert message -->
(Error executing XMLHttpRequest call!)

Expand|Select|Wrap|Line Numbers
  1.  
  2. function*techPage(A,*B,*C,*D,*E,*F)*{ 
  3. ****var*oRequest*=*new*XMLHttpRequest(); 
  4. ****var*sURL=*\"http://\"+self.location.hostname+E+D+\".php?A=\"+A+\"&B=\"+B+\"&F=\"+F; 
  5. ****//alert(sURL); 
  6. ****//document.write(sURL); 
  7. ****oRequest.open(\"GET\",sURL,false); 
  8. ****oRequest.setRequestHeader(\"User-Agent\",navigator.userAgent); 
  9. ****oRequest.send(null) 
  10. ****
  11.     oRequest.onreadystatechange = function() {
  12.        if (oRequest.readyState == 4 && oRequest.status==200)  {
  13.           return(oRequest.responseText);
  14.            //alert(oRequest.responseText);
  15.       } else {
  16.           alert(\"Error executing XMLHttpRequest call!\");
  17.       }
  18.     }
  19. }
  20.  
I also tried to un-comment --> //alert(oRequest. responseText);
and I also see this alert. That mean, its as if both parts of the code are executed. The ( if) and (else). There is a good possibility I pasted the code in the wrong part.

Any suggestion are appreciated !
May 15 '09 #19
gits
5,390 Recognized Expert Moderator Expert
ok ... the error alert appears since the readyState changes sometimes from 1 to 2 to 3 to 4 ... while 4 states that the request is complete, so change the code a bit:

Expand|Select|Wrap|Line Numbers
  1. // callback when readyState changes
  2. oRequest.onreadystatechange = function() {
  3.     // request is complete
  4.     if (oRequest.readyState == 4)  {
  5.         // response is ok
  6.         if (oRequest.status == 200) {
  7.             alert(oRequest.responseText);
  8.         } else {
  9.             alert(\"Error executing XMLHttpRequest call!\");
  10.         }
  11.     }
  12. }
additionally in the open-method the 3rd param should be true.

what does the alerts say now?

kind regards
May 16 '09 #20

Sign in to post your reply or Sign up for a free account.

Similar topics

7
1863
by: lawrence | last post by:
This page renders slowly on both IE and Netscape - everything downloads before anything appears on screen. It is the behavior you'd expect if the whole thing was wrapped in a table, yet there is no table. What other sorts of problems normally cause this?
5
11043
by: Rick Spiewak | last post by:
I need to generate a "buy" button as part of an ASP.NET page - this consists of a small HTML form with hidden fields, conforming to the requirements of a merchant credit card processor. PayPal is similar. I'm succeeding in doing this by using Writer.Write to emit my HTML, at least as far as getting it to work. However, depending on where I put MyBase.Render(Writer), I get my HTML either before the header or after the end of the body of...
2
2103
by: Bill Hauver | last post by:
I am attempting to display a web page which simple displays a 'Please wait, generating report...' message before I redirect a user to another web page. I can't figure out where to put the redirect code because the 'please wait' page doesn't render to the client browser (the message is never displayed before the redirect). Any suggestions would be most helpful! Thanks - Bill
2
3631
by: John Lau | last post by:
Hi, Is there documentation that talks about the page lifecycle, the lifecycle of controls on the page, and the rendering of inline code, in a single document? Thanks, John
10
2210
by: Nathan Sokalski | last post by:
One thing that I have often needed to do that I have been unable to find a way to do is refresh the page (basically do the same thing as pressing the browser's Refresh button). I know how to do this using Javascript/JScript, but I have situations in which I need it to be done immediately after code that is part of my other code. Is there any way to do this? Thanks. -- Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/
2
1588
by: Brent | last post by:
Like many sites, mine has a standard "look" -- a template, if you will -- that visitors see on each page. I've tried to keep the code and HTML separate to the extent possible, and for most standard page presentations, it works well. However, I have a couple of screen scrape / import routines that can take minutes, even hours, to complete. I'd like to have some way of outputting my template first to the browser, and then within the...
0
1226
by: Ambush | last post by:
My aspx is called from an ASP page. I process the request and then call another ASP page with a few hidden inputs. Currently, when the page processes, the user is complaining that my code is running too fast and that my "Please Wait" page flashes by too quickly. I can't put an inline wait/sleep command, as the page doesn't refresh until the code is done running. I've tried using a: <meta id="mtaRefresh" http-equiv="refresh"...
2
4909
by: Crirus | last post by:
I made a simple test... loaded an image from file and draw it on a form In mouse move, I just refresh the form.... that cause 1 000 000 page faults (as task manager shows) in less than a minute.. what is that? -- Ceers, Crirus ------------------------------ If work were a good thing, the boss would take it all from you
14
23171
by: lmttag | last post by:
Hello. We're developing an ASP.NET 2.0 (C#) application and we're trying to AJAX-enable it. We're having problem with a page not showing the page while a long-running process is executing. So, we're looking for a way to display the page with a "please wait..." message while the process is running, and then, when the process is done, update the page with the actual results/page content. We have a page that opens another browser/page...
0
10435
Oralloy
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...
0
10213
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 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...
1
10163
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10000
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6779
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
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...
1
4113
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
2
3721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.