exchange select entries

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ron Eggler @ work

    #1

    exchange select entries

    hi,

    I got several entries and two checkboxes and I would like to exchange the
    entries from one select to the other. like 'Add' and 'Rmove'. Is it possible
    anyhow? Can anyone help me where to start? Thank you very much!
    [My HTML]
    <form action="select. php">
    <p>
    <select name="ham" size="10">
    <option>Example 1</option>
    <option>Example 2</option>
    <option><!--address--></option>
    </select>
    <input type="button" name="ToSpam" value=">>"
    onClick="moveSp am()">
    <input type="button" name="ToHam" value="<<"
    onClick="moveHa m()">
    <select name="spam" size="10">
    <option>Example A</option>
    <option>Example B</option>
    <option><!--address--></option>
    </select>

    </p>
    <input type="submit" value=" OK ">
    </form>
    [/My HTML]


  • Matt Kruse

    #2
    Re: exchange select entries

    Ron Eggler @ work wrote:[color=blue]
    > I got several entries and two checkboxes and I would like to exchange
    > the entries from one select to the other. like 'Add' and 'Rmove'. Is
    > it possible anyhow? Can anyone help me where to start?[/color]

    Start with a library that makes it easy :)


    Hope that helps!

    --
    Matt Kruse




    Comment

    • Ron Eggler @ work

      #3
      Re: exchange select entries

      Matt Kruse wrote:[color=blue]
      > Ron Eggler @ work wrote:[color=green]
      >> I got several entries and two checkboxes and I would like to exchange
      >> the entries from one select to the other. like 'Add' and 'Rmove'. Is
      >> it possible anyhow? Can anyone help me where to start?[/color]
      >
      > Start with a library that makes it easy :)
      > http://www.javascripttoolbox.com/optiontransfer/
      >
      > Hope that helps![/color]

      Hey Matt,

      Thank you for that useful link! But didn't get it to work till now :(
      IE says opt would be NULL or no object in line 33 which looks like this:
      <body bgcolor="#FFFFF F" text="#000000" onLoad="opt.ini t(document.form s[0])">
      and my head looks like this:
      <head>
      <title>iNetGa te pop-spam-filter</title>
      <script LANGUAGE="JavaS cript"
      SRC="combined-compact/OptionTransfer. js"></script>
      <SCRIPT LANGUAGE="JavaS cript">
      var opt = new OptionTransfer( "ham","spam ");
      opt.setAutoSort (true);
      opt.setDelimite r(",");
      opt.setStaticOp tionRegex("");
      opt.saveRemoved LeftOptions("re movedLeft");
      opt.saveRemoved RightOptions("r emovedRight");
      opt.saveAddedLe ftOptions("adde dLeft");
      opt.saveAddedRi ghtOptions("add edRight");
      opt.saveNewLeft Options("newLef t");
      opt.saveNewRigh tOptions("newRi ght");
      </SCRIPT>
      </head>
      so, don't understand it, where's the problem?
      Thank you! :)


      Comment

      • roN @ work

        #4
        Re: exchange select entries

        Ron Eggler @ work wrote:[color=blue]
        > Matt Kruse wrote:[color=green]
        >> Ron Eggler @ work wrote:[color=darkred]
        >>> I got several entries and two checkboxes and I would like to
        >>> exchange the entries from one select to the other. like 'Add' and
        >>> 'Rmove'. Is it possible anyhow? Can anyone help me where to start?[/color]
        >>
        >> Start with a library that makes it easy :)
        >> http://www.javascripttoolbox.com/optiontransfer/
        >>
        >> Hope that helps![/color]
        >
        > Hey Matt,
        >
        > Thank you for that useful link! But didn't get it to work till now :(
        > IE says opt would be NULL or no object in line 33 which looks like
        > this: <body bgcolor="#FFFFF F" text="#000000"
        > onLoad="opt.ini t(document.form s[0])"> and my head looks like this:
        > <head>
        > <title>iNetGa te pop-spam-filter</title>
        > <script LANGUAGE="JavaS cript"
        > SRC="combined-compact/OptionTransfer. js"></script>
        > <SCRIPT LANGUAGE="JavaS cript">
        > var opt = new OptionTransfer( "ham","spam ");
        > opt.setAutoSort (true);
        > opt.setDelimite r(",");
        > opt.setStaticOp tionRegex("");
        > opt.saveRemoved LeftOptions("re movedLeft");
        > opt.saveRemoved RightOptions("r emovedRight");
        > opt.saveAddedLe ftOptions("adde dLeft");
        > opt.saveAddedRi ghtOptions("add edRight");
        > opt.saveNewLeft Options("newLef t");
        > opt.saveNewRigh tOptions("newRi ght");
        > </SCRIPT>
        > </head>
        > so, don't understand it, where's the problem?
        > Thank you! :)[/color]

        Can't anyone else help me?


        Comment

        Working...