i think the problem is with your selector (and this is above and
beyond the "psuedo" error

$("form input[name=setting1]:radio").filter(':checked').click

that will only bind the "click" event to checked radio buttons, which
on page load wouldn't be the desired behaviour

I've fallen for "event delegation" lately, and taking your HTML, this
would work nicely  :-)

super quick example using your HTML
http://jsbin.com/ajaju/edit (code)
http://jsbin.com/ajaju (run)


On Dec 30, 11:03 am, Silver <8800gt...@gmail.com> wrote:
> Hey all,
>
> I think I'm close, but I keep getting the errors ( Unkonw pseude-class
> or pseude-elmemt 'radio').
>
> All I need is if the user clicks a radio button for the right if
> statement to run and send the variables to the dq_process php file.
>
> $("form input[name=setting1]:radio").filter(':checked').click(function
> () {
>     if ( $(this).val() == 'home_fy' )
>             $.post("dq_process.php", { q: 1, r: 13300 } );
>     else if ( $(this).val() == 'home_by' )
>             $.post("dq_process.php", { q: 1, r: 24400 } );
>     else
>             $.post("dq_process.php", { q: 1, r: 00000 } );
>
> });
>
> <ol class="answers">
>                 <li><input type="radio" name="setting1" value="home_fy"  /> 
> Home –
> front yard</li>
>                 <li><input type="radio" name="setting1"
> value="home_by"  /> Home – back yard</li>
>                 <li><input type="radio" name="setting1"
> value="cottage"  /> Cottage</li>
> </ol>
>
> Any help would be great. Thanks

Reply via email to