Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. PirateElf

    Dropdown box with current value?

    Sorry about that but I am just attempting things that might work. I am a novice at best and it's hard going over code that should work but doesn't. As per request I tried this: if ( $userDB{$i}->{'FieldType'} == 2 ) { my $curval = $userdata{$username}->{$i}; $ucode = qq[<select...
  2. PirateElf

    Dropdown box with current value?

    Edit would be nice... here is another form, but this one only produces a long drop down of curval... if ( $userDB{$i}->{'FieldType'} == 2 ) { my $curval = $userdata{$username}->{$i}; $ucode = qq[<select name="$i" size="$userDB{$i}->{'FieldSize'}">\n]; my @options = split(/\|/...
  3. PirateElf

    Dropdown box with current value?

    I don't get it. If I do curval eq option I get nothing and it will only show the drop down box. However if I do a currant value match it sort of works, but just the same as the above code. I am not entirely sure why it won't match the curval if I use eq or why it shows multiple iterations of...
  4. PirateElf

    Dropdown box with current value?

    Thank you I tried working with that but this if ( $userDB{$i}->{'FieldType'} == 2 ) { my $curval = $userdata{$username}->{$i}; $ucode = qq[ <select name="$i" size="$userDB{$i}->{'FieldSize'}"> ]; my @options = split(/\|/, $userDB{$i}->{'Options'}); foreach my $option...
  5. PirateElf

    Dropdown box with current value?

    Well basically I am borrowing from the master code that does this for the cms that I use. The problem though is I am new to perl at best and not entirely sure what commands will get my result. Basically: I tried to simplify it and got an error but it was just a quick thing: if...
  6. PirateElf

    Dropdown box with current value?

    I can't modify posts but this works a bit better but it still won't show the currently selected variable $ucode = qq~<select name="$i" size="$userDB{$i}->{'FieldSize'}">~ . join('', map { '<option ' . ($_ =~ /^\[(.+)\]/ ? (HTMLescape($i) eq HTMLescape($1) ? selected : '') . '>' ...
  7. PirateElf

    Dropdown box with current value?

    the values are stored in $userDB{$i}->{'Options'} But the last example won't work due to the fact I can't seem to get the expression to undertand the | seperator
  8. PirateElf

    Dropdown box with current value?

    Ok basically I have set so that it shows the options like so: in html <select name="Delicious" size=""><option selected value=""></option><option value=>Yes (Show) </option><option value=> No (Off)</option></select> The problem is that when you select something it does not save in the field...
  9. PirateElf

    Dropdown box with current value?

    your are correct that it would be selected but the problem I am running into is it showing the fields that are available. I am not entirely sure as to why the options themselves will not select.
  10. PirateElf

    Dropdown box with current value?

    I have been working on this for a minute now and am curious if someone can tell me where I am going wrong. if ($userDB{$i}->{'FieldType'} == 2) { my $curval = $userdata{$username}->{$i}; $ucode = qq~<select name="$i" size="$userDB{$i}->{'FieldSize'}"><option...

Part and Inventory Search

Back
Top