473,783 Members | 2,577 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 #1
25 4686
Frinavale
9,735 Recognized Expert Moderator Expert
Are you calling the method that displays "waitQuery" during the OnClick event before the 2 selectors are dynamic created?

It may help if you post a code snippet so that we can see what you're doing.
May 12 '09 #2
tusovka
23 New Member
@Frinavale
Yes, Im calling a function that displays the message that is already hard coded in to the span id='waitQuery'

once the selectors are generated I call a similar function that changes the span display to none.
-------------------------------------------------------------------------------
Expand|Select|Wrap|Line Numbers
  1.  <input type=\"radio\" name=\"$inputName\" value=\"$build\" 
  2.  
  3.           onclick=\"javascript:
  4.  
  5.  
  6.           queryMessageOn(); 
  7.           --
  8.           code that generates selectors
  9.           document.getElementById('tech_selector').innerHTML=techinfo; 
  10.           --
  11.           queryMessageOff(); 
  12.  
  13. \">
  14.  
-------------------------------------------------------------------------------
Expand|Select|Wrap|Line Numbers
  1. function queryMessageOn(){
  2.     document.getElementById('waitQuery').style.display='';
  3. }
  4.  
  5. function queryMessageOff(){
  6.     document.getElementById('waitQuery').style.display='none';
---------------------------------------------------------------------------------

what is (techinfo) = Basically I have a php code that generates a selector and then when that page is done the output is stored in to a span that is the newly generated selector.

You would think IE would atleast display the message because that is the first thing that should happen onclick. Yet, once you click a radio button it everything stands still for the query and then selectors are displayed.

Please ignore all the extra ( " \ ;) because all this stuff is inside php code.
May 12 '09 #3
gits
5,390 Recognized Expert Moderator Expert
how do you send the query? do you use ajax for that purpose? in case you do ... then ensure that it is done async ... otherwise the browser will wait for the query and may show such behaviour ...

kind regards
May 13 '09 #4
tusovka
23 New Member
@gits
//techPage() is a javascript function that generates a URL to another php file that actually creates the query. Once the query returns, tech.php generates the appropriate HTML code for the selector. Next, the whole output of that page tech.php is stored in the variable (techinfo) as seen below.

var techinfo=techPa ge(A, B, C, D);

Now, you cant think of the whole code for the selector is inside the techinfo variable. Then next step I do is populate the appropriate <span> that will hold the newly generated selector.

Finally, I want the message to be turned of because the process of generating the selector is complete.

FireFox works great, yet IE(version 7) seems to wait, until the span for the selector is filled.

---

Inside my tech.php I examine the URL, pull out the info I need to generate the query and execute it.

mysqli_connect_ to_server(-----);
mysqli_MY_own_m ySqli_func(-----);
mysqli_disconne ct_from_server( $link);

once everything is done the last two lines in tech.php
flush();
exit;
?>

---

Does any one know how to write a small Javascript function that can tell if a:
query is in not complete, or when the <span> container is populated or is empty onChange type of approach.
May 13 '09 #5
gits
5,390 Recognized Expert Moderator Expert
as i said ... do you use an ajax-call for the query? without doing so the browser just waits for the response ... while an ajax call could be done async and tells you when it would be complete. since that would run in the background the browser would even be responsive during the call ...

kind regards
May 13 '09 #6
Frinavale
9,735 Recognized Expert Moderator Expert
Gits, if the OP is not using Ajax, could they use the setTimeout() method to display the "Please Wait" message?


Eg:
Expand|Select|Wrap|Line Numbers
  1.   setTimeout(queryMessageOn(), 100); 
  2.   //.....
  3.   queryMessageOff(); 
May 13 '09 #7
gits
5,390 Recognized Expert Moderator Expert
you shouldn't use it and typically you do not but: of course you could do ... but couldn't that be the problem? ... and just to confirm that i asked the OP whether he uses the XMLHttpRequest or not ...
May 14 '09 #8
gits
5,390 Recognized Expert Moderator Expert
ahh ...wait Frinny ;) ... was that a question? ... in case it was ... then the answer would be to not doing so .... don't know every browsers behaviour ... but doing sync requests will cause the browser to block execution of code ... in favour of waiting for the response ... may be that you would have luck with the timeout in one browser ... but in others it might fail. the best and most reliable way is to do an async XMLHttpRequest (aka: ajax-call) ...

kind regards
May 14 '09 #9
tusovka
23 New Member
@gits
Gits,

I'm not sure i have never seen ajax before. Plus, this code was thrown at me, and I need to slowly understand it and modify it. Could you post a simple ajax call query.
The only place I see the query being executed is in a php format. Sorry if I did not answere you the first time. All of this is new to me.

Frinavale,

I tried using the setTimeout(quer yMessageOn(), 100); in my Javascript portion.
That is after you click a radio button selection.
The result is:
First, there is the initial wait for the query (2sec) then we see the selector plus the message. Once the time is up the message is errased. So basically we are at the same place.
The message does not appear will the query is in progress. Insted it appears after the selector is generated and displayed. Note, this is only in IE not Firefox.

Any exaples of Ajax would be nice.
May 14 '09 #10

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

Similar topics

7
1862
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
3630
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
1220
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
4907
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
23170
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
9480
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,...
0
10315
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
9946
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...
0
8968
agi2029
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...
1
7494
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
5379
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...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
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
3
2877
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.