Hello all,

I have a form that uses POST to send the info to me. In the form, I have a drop down menu. I also have sub-menus that are visible or not based on which option is selected. For the sake of these sub-menus, I had to put a value to each option on the list so that I could use JS.

So here is the question: Is it possible to find a work around so that when the email is sent, the subject contains the item in the menu instead of its value and still be able to use the JS code? I tried to use the id attribute on the options instead of value, but then the JS doesn't work. At first I thought it was the PHP and i posted there, but I think I need help with the JS part, since the PHP seems to fine.

Let me also note, that the code is otherwise working fine, so I only took out small portions for examples, I just want to get the subject part to look better for the sake of replies. Thank you so much in advance!!!

Lauren

Here is the html for the list:

Code HTML4Strict:
<label for="subject">Subject:</label>
<select id="subject" name="subject" size="1">
<option>Select One</option>
<option value="gen">General Question/Comment</option>
<option value="video">Request an Audio/Video Quote</option>
<option value="bill">Payments/Billing</option>
<option value="comp">Computer Service</option>
<option value="mmserv">Multimedia Service</option>
<option value ="foren">Forensic Service</option>
<option value="other">Other</option>
</select>


here is the JS:
Code JavaScript:
$('p#general').hide(); 
        $('#subject').change(function() {
        var val = $(this).val();
        var hide = (val == 'gen') ? false : true;
        (hide == true) ? $('p#general').slideUp('slow') : $('p#general').slideDown('slow');
        });

here is the php:
Code PHP:
$msg = " Name: $name\n" .
 
    "Email:   $email\n" .
 
    "Phone:   $phone\n" .
 
    "$subject\n" .
 
    "Operating System:   $opsys\n" .
 
    "How did you hear about us?:   $hear\n" .
 
    "Promo Code:   $promo\n" .
 
    "Comments:   $description\n" . 
 
    "Join mailing list:   $mailing\n";


__________________