Google Answers Logo
View Question
 
Q: SImple Javascript for items in a list to load incrementally ( No Answer,   2 Comments )
Question  
Subject: SImple Javascript for items in a list to load incrementally
Category: Computers > Programming
Asked by: asm_internet-ga
List Price: $20.00
Posted: 17 Sep 2006 13:17 PDT
Expires: 17 Oct 2006 13:17 PDT
Question ID: 766104
Here is a quick $20 to help me with this function. I will show the
html page code. All i need is:

1. for the <LI> list items to display one at a time, where i can
determine the time interval (default 1 sec) for each to load.
2. To be able to represent the bullet with a graphic (bullet.gif)

3. The only action required on the part of the veiwer is to open that
page - so this must happen automatically.

Challenge - works the same in Explorer, Netscape and Firefox.

Thanks!

Code:


<html><head><title>Bullets 2.0</title></head>
<body>
<table width="96%" border="0" cellpadding="0" cellspacing="0"><tr>
    <TD align=right width=12></td>
    <TD> <font face=verdana size=2>
   <h1>Title</h1>
Here are the items to consider:<BR><ul>

<LI>Item 1
<LI>Item 2
<LI>Item 3
<LI>Item 4
 </ul>
   </td>
  </tr></table>
   </body></html>
Answer  
There is no answer at this time.

Comments  
Subject: Re: SImple Javascript for items in a list to load incrementally
From: cjmovie-ga on 17 Sep 2006 20:34 PDT
 
For your list:
<li id="ListP1" style="visibility: hidden;">List element 1....</li>
<li id="ListP2" style="visibility: hidden;">list element 2....</li>
<li id="ListP3" style="visibility: hidden;">list element 3....</li>

in <head></head>:
<script type="text/javascript" language="javascript">
 var NumListElements = 3; //Change for each element count
 var Current = 1;
 function NextElement(){
  document.getElementById("ListP"+Current).style.visibility="visible";
  Current++;
  if(Current <= NumListElements)setTimeout("NextElement();", 1000);
//1000 == one second
 }
</script>

in the <body> tag:
<body onload="javascript:NextElement();">

*note*
Not sure if it works, just a post off the top of my head :-)
Subject: Re: SImple Javascript for items in a list to load incrementally
From: asm_internet-ga on 26 Sep 2006 20:24 PDT
 
hey cjmovie-ga 

 sorry i forgot to follow up, please add this as an answer - and i'll pay :D

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy