[geeklog-users] Copy button (start->end) on event editing

SuD sud_NOSPAM at latinsud.com
Wed May 12 18:11:40 EDT 2004


I was thinking that a copy start date to end date would be fine in event 
editor, as many events have end time near start time.

I made a small inline javascript (maybe non too compliant, but at leat 
works on firefox and IE 6):

  <form action="{site_url}/submit.php" method="post" name="eventthings">
...
  <input type="button" value="Copiar" onclick="javascript:
                                            var tmp=document.eventthings;
                                            
tmp.end_month.selectedIndex=tmp.start_month.selectedIndex;
                                            
tmp.end_day.selectedIndex=tmp.start_day.selectedIndex;
                                            
tmp.end_year.selectedIndex=tmp.start_year.selectedIndex;
                                            
tmp.end_hour.selectedIndex=tmp.start_hour.selectedIndex;
                                            
tmp.end_minute.selectedIndex=tmp.start_minute.selectedIndex;
                                            
tmp.end_ampm.selectedIndex=tmp.start_ampm.selectedIndex;
                                            ">

You can see it live here: 
http://www.almeria-wireless.org/submit.php?type=event
And get the full code here: 
http://almeria-wireless.org/layout/Classic/submit/submitevent.thtml

Please don't tell me that this was already done, as it usually happens :)



More information about the geeklog-users mailing list