473,324 Members | 2,313 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,324 software developers and data experts.

refreshing html document

I want to make an html document.

Suppose the name of the html document is anu.html.

What i want is at first it will show "hello anutosh",


and after 5 sec there will be some other information which will be shown by
that very same html called anu.html.

So the refreshment is the main problem.

any one can tell me how can i remove "hello anutosh" and substitute other information in place of that string in that very same html.

waiting for your reply.

Thanks!
Mar 31 '08 #1
4 1154
LorenW
7
Depending on what you are trying to do, it may not be necessary to reload the page to display the new message in the place of the old one. Can you give more specifics?
Mar 31 '08 #2
LorenW
7
I am no expert, but maybe something like this might help:

Expand|Select|Wrap|Line Numbers
  1. <script language="JavaScript">
  2.  
  3.     window.setTimeout('runAfterSomeTime()', 5000); // Five seconds
  4.  
  5.     function runAfterSomeTime(){
  6.         document.getElementById('message').innerHTML = "Goodbye my friend."
  7.     }
  8.  
  9. </script>
  10.  
  11. <span id="message">Hello Anutosh</span>
  12.  
Resources of possible interest:
http://www.w3schools.com/htmldom/pro..._innerhtml.asp
http://www.howtocreate.co.uk/tutoria...ascript/timers
Mar 31 '08 #3
Thanks LorenW .Thank you very much.
Apr 1 '08 #4
LorenW
7
My pleasure to be able to help. By the way, I have been told since my post to you that the proper way to do the embedded JavaScript script tag is as follows below, so I wanted to share that just incase:

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2. <!--
  3.  
  4. /* Your code goes here */
  5.  
  6. // -->
  7. </script>
  8.  
Good luck!
Apr 1 '08 #5

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

Similar topics

2
by: Paul Eghbal | last post by:
Hi all, I'm trying to use the following script: <script language="javaScript"> function setrepto(){ document.aForm.repno.value = document.aForm.rep.options.value; } </script>
3
by: John Ortt | last post by:
I appologise for reposting this but I have been trying to find a solution all week with no avail and I was hoping a repost might help somebody more knowledgable than myself to spot the message... ...
31
by: Greg Scharlemann | last post by:
Given some recent success on a simple form validation (mainly due to the kind folks in this forum), I've tried to tackle something a bit more difficult. I'm pulling data down from a database and...
0
by: msnews | last post by:
Hi -- I'm very, very new to ASP.Net, and I've been trying for several days to figure out how to update a datagrid AND refresh it on the client side so that the page doesn't refresh. I've torn my...
3
by: Marcin Domaslawski | last post by:
Hi, I've got simple script which adds to pointed DIV another DIV which contains 1 combobox (select) and textbox (input) - it's a AddNewRow() function. Every field has got unique ID (acording with...
3
polymorphic
by: polymorphic | last post by:
I have succeeded in embedding PDF files in a dynamic iframe. The problem is that I need the PDF to cache. If the PDF remains the same from page load to page load then the pdf is somehow cached with...
2
by: stevemtno | last post by:
I've got a problem with a web page I'm working on. I have 4 modules - one of them has 2 tabs, two of them have 4 tabs. When the user clicks on the tabs, the content below them changes. However, when...
6
by: shankari07 | last post by:
hi guys, I have a form in html which has the city drop down. when clicking the drop down a javascript is called and a file(test.txt) is created and the city is written into the file. Through php...
5
by: handoyo | last post by:
Hi all,i'm trying to show updated data in existing html td.. For example i got column that show last modified datetime,then i want to update data again,the column will changed to current time without...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.