View Single Post
  #2 (permalink)  
Old Apr 3rd, 2008, 22:25
CloudedVision's Avatar
CloudedVision CloudedVision is offline
Nerdy Moderator
Join Date: Feb 2008
Location: In My Own Little World
Age: 14
Posts: 1,229
Blog Entries: 9
Thanks: 2
Thanked 38 Times in 38 Posts
Re: Automatic Button 'Looping' for Navigation

Quote:
To put a long story short, i need a web site with a navigation devised from form buttons, which automatically tabs through each button in sequence every 1.5 or 2 seconds.
May I ask why? I'm really curious why you would need to do this.

But first, get rid of the onfocus="javascript" things and the body onload. Then replace press_tab() with this:

Code: Select all
var focused = 0;
function press_tab() {
    focused++;
    if(focused==4)
        focused=1;
    document.getElementById('box'+focused).focus();
    setTimeout("press_tab()",1500);
}

window.onload = press_tab;
Give that a shot. I didn't try it out, so there will probably be a couple of errors.
__________________
CloudedVision, WebForumz Moderator
Web Design And Development: Other Road Design | Problems with IE6?: KApp | My Blog: Only Nerds Allowed
Reply With Quote