[Javascript] Sumitting a selection every 4 seconds

Terry Riegel riegel at clearimageonline.com
Wed May 19 16:14:14 CDT 2004


Good afternoon all,

I have an interesting problem I thought I would throw out to see if 
anyone has any ideas.

I am creating an online file manager. It has three frames (top,left, 
and right) the left frame contains a list of items that the user can 
select. When he selects 1 the details of that file show up in the right 
frame. If he selects multiple items they show up in the right frame as 
well.

The select functionality is working, but what I can't figure out is how 
to delay before updating the right frame. (So if a user is selecting 
multiple items only one refresh on the server is needed)

This is my initial solution

function verify()
{
if (parent.details.browseform["fm_list"].value != "undefined" )
  {
   if (parent.details.browseform["fm_list"].value == 
document.browseform["fm_list"].value)
    { }
   else
    {document.browseform.submit();}
  }
setTimeout("verify()",4000);
}

This basically checks every 4 seconds for a change and submits the form 
if a change has occurred. The problem is this function seems to quit 
when the right frame's items are undefined. That is fine. So what I 
would like to do is tie the submit to the selection process. The 
problem is this incurs a refresh for every item selected.

Any Ideas?

you can check it out at

http://client1.riegels.com/pages/start/filemanager/filemanager.html

Make sure "Sticky" is selected to see how the multiple selections work

Thanks for any help,

Terry Riegel




More information about the Javascript mailing list