User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: Nov 2006
Posts: 2
Reputation: mahesh_gupta024 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mahesh_gupta024 mahesh_gupta024 is offline Offline
Newbie Poster

Help Hai All, Can anybody solve this problem its urgent

  #1  
Apr 30th, 2007
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2006
Location: Deptford, London
Posts: 964
Reputation: MattEvans has a spectacular aura about MattEvans has a spectacular aura about 
Rep Power: 5
Solved Threads: 48
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Posting Shark

Re: Hai All, Can anybody solve this problem its urgent

  #2  
Apr 30th, 2007
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
If it only works in Internet Explorer; it doesn't work.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 11:38 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC