On Nov 9, 8:23 am, alternapop <[EMAIL PROTECTED]> wrote:
> i have the javascript working that gets the current hour.  if my html
> was just one long list, i know how to use an anchor to jump to a
> certain anchor....  but with iUI and iPhone hierarchical type list,
> how would can i jump to different unordered list?
>
> thanks...
>
> <body>
> <h4>
> <script type="text/javascript">
> <!--

Hiding scripts with HTML comments has been unnecessary for many years,
just don't do it.


> function goToAnchor(){
>         var currentTime = new Date();
>         var hours = currentTime.getHours();
>
>         // get hour of day making sure it's an even number
>         if (hours%2==1)
>                 {
>                 hours = hours - 1
>                 }
>                 else {
>                 }
>
>         anchorname = hours;

A more concise implementation of the above is:

  var hours = (new Date()).getHours();
  hours -= hours%2;

HTH  :-)

--
Rob


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to