jquery load function problem
Posted
by
andrew
on Stack Overflow
See other posts from Stack Overflow
or by andrew
Published on 2010-12-28T05:20:31Z
Indexed on
2010/12/28
5:54 UTC
Read the original article
Hit count: 191
jQuery
Hi, i have a select box like that
<select name="sehirler_post" id="sehirler_post">
i am getting values via jquery. i know two different ways to get values. first one is :
var sehirler_post = jQuery('select#sehirler_post').attr('value');
second one is:
jQuery('#sehirler_post ').val()
and finally here is my problem, i have something like this:
jQuery("#okay").load("ajax_post_category.php?okay="+id+"");
i would like to use selectbox value instead of id (okay="+id+"). so, i must change +id+ part with select box value. however i can not do it.. i tried to do like that:
jQuery("#okay").load("ajax_post_category.php?okay="+jQuery('#sehirler_post').val()+"");
it did not work. there must be a way, so i can use selectbox value instead of id in my load function. if anyone helps me, ill be so glad.
regards
© Stack Overflow or respective owner