javascript - Two different values set in one select/option choice

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • glady
    New Member
    • Nov 2006
    • 23

    #1

    javascript - Two different values set in one select/option choice

    Please help
    I saw the posted forum, the one i exactly want, could you just help me,
    here is the code...
    <td width="24%"><di v align="right">S elect Area:</div></td>
    <td width="19%">
    <select name="recipient " class="loginSel ect">
    <option value=""></option>
    <option value="gotocent ral@mydomain.co m">Central </option>
    <option value="gotowest @mydomain.com"> West</option>
    <option value="gotoeast @mydomain.com"> East</option>
    </select>
    </td>
    --------------------------------
    My question is, if i select West, it should send the mail to both west as well as central. Just like if i choose east, it should send mail to both east and central. So how can i set both values in single option value.
    Something like ....... not exactly
    <option value="gotowest @mydomain.com"; "gotocentral@my domain.com">Wes t</option>
    Thanks
  • TheMadMidget
    New Member
    • Oct 2006
    • 98

    #2
    depending on the mail system you use, you can just put a comma in between the two address or just put the central under a CC:

    Comment

    • glady
      New Member
      • Nov 2006
      • 23

      #3
      Originally posted by TheMadMidget
      depending on the mail system you use, you can just put a comma in between the two address or just put the central under a CC:
      I am using FormMail.pl file in php-nuke .If i choose, west and submit button it should mail to two different mail address.
      I will try with comma or put CC. and see if it works or not.
      Thanks.

      Comment

      • TheMadMidget
        New Member
        • Oct 2006
        • 98

        #4
        Two things,
        1. This is an old demonstration code, you're going to have to redo it a little for yourself.
        2. You're in the PHP forum, this is more JS stuff
        Code:
        <script>
        function visi(nr)
        {
        	if (document.layers)
        	{
        		vista = (document.layers[nr].visibility == 'hide') ? 'show' : 'hide'
        		document.layers[nr].visibility = vista;
        	}
        	else if (document.all)
        	{
        		vista = (document.all[nr].style.visibility == 'hidden') ? 'visible'	: 'hidden';
        		document.all[nr].style.visibility = vista;
        	}
        	else if (document.getElementById)
        	{
        		vista = (document.getElementById(nr).style.visibility == 'hidden') ? 'visible' : 'hidden';
        		document.getElementById(nr).style.visibility = vista;
        
        	}
        }
        </script>
        <form>
        <select id="PlaceNameHere">
          <option>Milk</option>
          <option>Coffee</option>
          <option>Tea</option>
        </select></form>
        <A href="#" onClick="visi('PlaceNameHere');">Toggle visible/invisible</A>

        Comment

        • TheMadMidget
          New Member
          • Oct 2006
          • 98

          #5
          Also there is going to be a gap there if it's invisible, but dropdowns aren't that big.

          Comment

          Working...