JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 26th, 2004, 05:47 PM
sus sus is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 1 sus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question drunken pulldown menu!! please help

Hi,
does anyone know what could be causing my pulldown menu to revert back to previous menu item even after i click on new item on top?


For example: Immagine the following are PULLDOWN items. Lets say the following pulldown menu is current at Menu 3.

PULLDOWNMENU
Menu 1
Menu 2
Menu 3 <---
Menu 4
Menu 5

When I select Menu 1,
the -onclick is able to recognize that I have selected Menu1, but the Pulldown menu itself reverts back to Menu 3
instead of staying at Menu 1. The same goes for other items that are ABOVE Menu 3.

PULLDOWNMENU
Menu 1
Menu 2 <-- this was selected and variables passed, but
Menu 3 <--- pulldown menu still points to this item
Menu 4
Menu 5


But strangely, this doesn't happen for items that are below Menu 3)


PULLDOWNMENU
Menu 1
Menu 2
Menu 3
Menu 4 <--- if items below previous item selected, NO problem occurs.
Menu 5

What could be happening here? Pleaes help.

I'm using javascript onclick withina Perl CGI so that pulldown menu's are created dynamically on the fly.. in the following manner. Where I previously define pull down items using a hash.

For example:
Code:
  $pulldown{ftype} = [freq1,freq2,freq3];
 
  $pulldown{obssrc} = [source1, source2,source3];
 
  $pulldown{obssrc2} = [source1, source2,source3];
  $pulldown{datatype} = [ascii, binary, image];
 
 
 sub createpulldown { 
  print "<table><tr>";
  $tablex = 0; $tabley = 0;
  foreach $key (sort keys %pulldown){
    $tablex++; 
    if ($tablex > 5) { $tablex = 0; print "</td></tr><tr><td>"; } 
    else { print "<td>"; } 
    my @array = @{$pulldown{$key}}; my $default = ${$key};
    print "\n<font face=verdana size=-2>$key:\n"; 
    if ($key eq "ftype" || $key eq "obssrc" || $key eq "obssrc2" || $key eq "obssrc3") { 
      print $q->br, $q->scrolling_list
      (  -name=>$key, -values=>[@array],
         -defaults=>$default,-size=>1,
 #       -onchange=>'OnChange(this.form.select1);',
 #    -onchange=>"window.location=('xycoords.cgi?s=&showlast='+this.options[this.selectedIndex].value)"
     -onchange=>"window.location=('?&$key='+this.options[this.selectedIndex].value+'$cgistring')"
      ), $q->p;
    } else { print $q->br, $q->scrolling_list
        (    -name=>$key, -values=>[@array],
         -defaults=>$default,-size=>1,
        ), $q->p;
    } #if $key    
    print "</font></td>"; 
  } #for each
  print "</tr></table>";
   return 0;
 } #sub create pulldown

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > drunken pulldown menu!! please help


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 5 hosted by Hostway
Stay green...Green IT