Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old September 5th, 2005, 07:46 PM
jweizenblut jweizenblut is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Miami, Fl. US
Posts: 522 jweizenblut User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 29 sec
Reputation Power: 2
Send a message via AIM to jweizenblut Send a message via Yahoo to jweizenblut
Reset form select only...

Wondering if anyone knows javascript code that I can implement inside an if to reset a single form select.

I have the following error trapping:
php Code:
Original - php Code
  1.  
  2. function showDiv( id ) {
  3. if ((daily_staffing.type.selectedIndex == 1) || (daily_staffing.type.selectedIndex == 6) || (daily_staffing.type.selectedIndex == 14))
  4. {
  5. document.all[ id ].style.display = 'block';
  6. }
  7. else
  8. {
  9. document.all[ id ].style.display = 'none'
  10. document.daily_staffing.time_beg.value="";
  11. document.daily_staffing.time_end.value="";
  12. document.daily_staffing.total_hours.value="";
  13. document.daily_staffing.approving_supervisor.reset  ();
  14. }
  15. }

The last one that says reset() doesn't work. But that is what I need to have reset.

Reply With Quote
  #2  
Old September 6th, 2005, 07:36 AM
spud spud is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Melbourne, Australia
Posts: 163 spud User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Reset form select only...

as far as i can remember, you could do
document.daily_staffing.approving_supervisor.value = 'whatever the value of the first option is';

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Reset form select only...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway