•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 429,965 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,516 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 796 | Replies: 1
![]() |
•
•
Join Date: Nov 2006
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
I am developing a small Embedded webserver with some webpages written in CGI, so that whenever I execute a CGI, the code in Webserver will be executed and HTML content is sent to browser. Now if I press refresh continusly only half the page is being displayed on the browser. I have kept a div tag with and Id, so if id is not present i should clear all the HTML content on the browser and reload the same page again.
Now i could not clear the HTML content before reloading the page(because the time to make the request and reload the page is more). So please give me a solution to clear content the HTML page, and reload the page again.
Thanks in advance
Now i could not clear the HTML content before reloading the page(because the time to make the request and reload the page is more). So please give me a solution to clear content the HTML page, and reload the page again.
Thanks in advance
•
•
Join Date: Jul 2006
Location: Deptford, London
Posts: 964
Reputation:
Rep Power: 5
Solved Threads: 48
You should be able to just , refresh the page ; this will clear HTML on the page.
There are a number of Javascript methods; discussed here, don't use the <meta> tag atall, because it seems you want to 'invoke' the refresh rather than have an automatic (timed) refresh.
http://grizzlyweb.com/webmaster/javascripts/refresh.asp
If you're trying to send a sparse stream of information at undetermined intervals to any browsers 'watching' a certain URL; you might want to consider AJAX ( An overused term that should relate to Javascript's inbuilt HTTP request objects ); by that means, you can execute very small requests back to your webserver from a page, but without refreshing that page. The server can send back a result, and Javascript in the page can then check the result; either request again, or modify a page based on a result.
You can make basic web-based chat clients for example, using CGI + AJAX - the browser can keep asking the server for changes in the master stream using Javascript's XMLHTTP object, add any new messages to an onscreen-buffer; and handle sending messages back to the CGI, which adds messages to the master stream, and then broadcasts them to any browser that requests a stream update; without needing to refresh the page atall.
http://www.w3schools.com/dom/dom_http.asp
There are a number of Javascript methods; discussed here, don't use the <meta> tag atall, because it seems you want to 'invoke' the refresh rather than have an automatic (timed) refresh.
http://grizzlyweb.com/webmaster/javascripts/refresh.asp
If you're trying to send a sparse stream of information at undetermined intervals to any browsers 'watching' a certain URL; you might want to consider AJAX ( An overused term that should relate to Javascript's inbuilt HTTP request objects ); by that means, you can execute very small requests back to your webserver from a page, but without refreshing that page. The server can send back a result, and Javascript in the page can then check the result; either request again, or modify a page based on a result.
You can make basic web-based chat clients for example, using CGI + AJAX - the browser can keep asking the server for changes in the master stream using Javascript's XMLHTTP object, add any new messages to an onscreen-buffer; and handle sending messages back to the CGI, which adds messages to the master stream, and then broadcasts them to any browser that requests a stream update; without needing to refresh the page atall.
http://www.w3schools.com/dom/dom_http.asp
If it only works in Internet Explorer; it doesn't work.
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Problem with timer (urgent) (Visual Basic 4 / 5 / 6)
- Toshiba Satellite A20 Boot Priority Problem (Troubleshooting Dead Machines)
- Problem after installing MessengerPlus! (Viruses, Spyware and other Nasties)
- Netscape 7.1, Hotmail login problem - cookies 'disabled" (Windows NT / 2000 / XP / 2003)
- "cannot resolve symbol"problem (Java)
- Problem Viewing Graphics in IE (Web Browsers)
- Port 80 problem (Linux Servers and Apache)
- Back button problem with $Sessions and GET (PHP)
- Sendmail and SquirrelMail problem. (Linux Servers and Apache)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: help in validation by javascript
- Next Thread: Strange Javascript results


Linear Mode