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 455,985 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 3,772 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: 611 | Replies: 1
Reply
Join Date: Sep 2007
Posts: 18
Reputation: Roiie 530x2 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Roiie 530x2 Roiie 530x2 is offline Offline
Newbie Poster

Help Page Writting Help !

  #1  
Dec 4th, 2007
Hi Everyone, i wanted to know how i can have a script write some pre defined strings of text over a 40 second period with ocational pre defined second pauses.

I would really appreciate everyones help with this as it is quite important. thank you

The end result would be something like:


--------------------------------------------------------------------------------------------

(All of the following would be written by the script)

(The following would be written in a 5 second period with a 1 second pause after the first and second lines)

Searching For Webpage Configuration files...
...
Found 10 configuration files.

Loading Flies...

(The following would all be written in around 10 seconds, with the pauses being after the "Loading.." lines)


Loading confg...
Done..!
Loading fav...
Done..!
Loading sysinfo...
Done..!
Loading CCPVQ...
Done..!
Loading location...
Done..!
Loading history...
Done..!
Loading log...
Done..!
Loading fwconfig...
Done..!
Loading index...
Done..!
Loading ipconfig...
Done..!

File Loading Completed.

( Now the next 15 seconds would be spent writting the following. the status bars should take 4 seconds to finish each )

Checking Settings...
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Modifying Settings
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Applying Settings
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

(After that is done the remaining 10 seconds would be spent on the following, with the pauses before the "Done" lines)

Settings successfu applied !

Renewing IP Address...
Done..!

Activating Webpage...
Done..!

Settings Check Completed.

Press Home on the left hand menu to go to the webpage.

(Here it should stop and just wait for teh user to press the HOME button)
--------------------------------------------------------------------------------------------
Last edited by Roiie 530x2 : Dec 4th, 2007 at 6:37 pm.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2007
Location: Russia
Posts: 11
Reputation: adorosh is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
adorosh adorosh is offline Offline
Newbie Poster

Re: Page Writting Help !

  #2  
Dec 6th, 2007
Seems like you need to do this:
  1. var strings = [
  2. 'loading config',
  3. 'done',
  4. 'loading fav',
  5. 'done'
  6. ];// define values to print in this array
  7.  
  8.  
  9. function writeText(index) {
  10. var area = document.getElementById('area'); // textarea object where will be print each word step-by-step
  11. area.value += strings[index] + '\n';
  12. index++;
  13. if (index < strings.length) { // will stop when all words will be printed
  14. setTimeout('writeText('+index+')', 1000); // will print next word after 1 second
  15. }
  16. }
And the use following HTML to test this:
<textarea id='area'></textarea><br/>
<input type="button" value="start" onclick="writeText(0);">
Last edited by adorosh : Dec 6th, 2007 at 2:50 pm.
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 9:24 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC