select onchange option selected

Discussion in 'JavaScript' started by cucuru, Feb 5, 2010.

  1. #1
    hello! I have a select in my code, and I want to call a function when the onchange event happens. This function need the value selected as parameter. How can I do that?

    This is my code:

    
    	<select name='file' SIZE='1' onchange="ajaxFunc('marked')";>					
    <?php
    	while ($result = mysql_fetch_array($sql)){
    		echo "<option value='".$result['file']. "'>".$result['file']."</option>";
    	}
    ?>
    	</select>
    
    
    PHP:
    'marked' is what I want to know how to say

    Thanks. Regards
     
    cucuru, Feb 5, 2010 IP
  2. cucuru

    cucuru Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I found it, this.value. Thanks anyway!! regards
     
    cucuru, Feb 5, 2010 IP