Re: [jQuery] Selected value in dropdownlist

2006-10-05 Thread Harlley Roberto
It works! Thanks a lot :-)On 10/5/06, Sam Collett <[EMAIL PROTECTED]> wrote:
On 05/10/06, Harlley Roberto <[EMAIL PROTECTED]> wrote:> Hi folks,>> How can I get selected value in dropdownlist?>> That code does not work. Why ?
>> $(document).ready(function()> {> var test;> test = document.getElementById("ddlCourse").value;> $("#ddlCourse").change( function() {> $('#class').load('filter_report.asp', {ajax:'1',
> cod_course: test }); } );> });>>> thanks,>> Harlley>  [EMAIL PROTECTED]You can get the selected value like this:
test = $("#ddlCourse").val()___jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/
-- Att.Harlley R. Oliveira[EMAIL PROTECTED]
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selected value in dropdownlist

2006-10-05 Thread Sam Collett
On 05/10/06, Harlley Roberto <[EMAIL PROTECTED]> wrote:
> Hi folks,
>
> How can I get selected value in dropdownlist?
>
> That code does not work. Why ?
>
> $(document).ready(function()
> {
> var test;
> test = document.getElementById("ddlCourse").value;
> $("#ddlCourse").change( function() {
> $('#class').load('filter_report.asp', {ajax:'1',
> cod_course: test }); } );
> });
>
>
> thanks,
>
> Harlley
>  [EMAIL PROTECTED]

You can get the selected value like this:
test = $("#ddlCourse").val()

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selected value in dropdownlist

2006-10-05 Thread Stephen Howard
if ddlCourse is the select box, you can simplify your code to this, but 
I'm not sure why it isn't working:

$(function() {

$('#ddlCourse").change( function() {

$('#class').load( 'filter_report.asp',  {  ajax: 1,  cod_course: 
this.value  } );
});
});

Have you tried doing an alert(this.value) to see if it's a problem with 
the select box value retrieval or a problem with the ajax loader?

-Stephen

Harlley Roberto wrote:
> Hi folks,
>
> How can I get selected value in dropdownlist?
>
> That code does not work. Why ?
>
> $(document).ready(function()
> {
> var test;
> test = document.getElementById("ddlCourse").value;
> $("#ddlCourse").change( function() { 
> $('#class').load('filter_report.asp', {ajax:'1', cod_course: test }); } );
> });
>
>
> thanks,
>
> Harlley
> [EMAIL PROTECTED] 
> 
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>   

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Selected value in dropdownlist

2006-10-05 Thread Harlley Roberto
Hi folks,How can I get selected value in dropdownlist?That code does not work. Why ?$(document).ready(function(){    var test;     test = document.getElementById("ddlCourse").value;
    $("#ddlCourse").change( function() { $('#class').load('filter_report.asp', {ajax:'1', cod_course: test }); } );});thanks,Harlley 
[EMAIL PROTECTED]
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/