[jQuery] Re: .get question related to external variables

2008-11-11 Thread JLChafardet




JLChafardet wrote:
> 
> Hello list, im trying to perform a very (not that easy to me it seems)
> easy task.
> 
> Receive 2 variables from an onclick event, then animate, then execute a
> .get action.
> 
> my code looks like this.
> .
> 
> 
>   function getVars (str1,str2) {
>   var tc_id = str1;
>   var c_id = str2;
>   
>   $(document).ready(function(){
>   $(".del").click(function(){
>   $(this).parents(".tags").animate({ opacity: 'hide' },
> "slow").addClass("removed");
>   $.get('tareas.php', {
>a: 'u',
>t: 'rtc',
>tcid: tc_id,
>cid: c_id
>   });
>   });
>   });
>   };
> 
> .
>while ( $array = mysql_fetch_array ( $res, MYSQL_ASSOC ) ) {
>   ?>
>   < img src="../iconos/delete_16.png"
> align="absmiddle" class="del" border="0" onClick="getVars(' $array ['id_tagcloud']; ?>','')" />    echo $array ['palabra_tagcloud'];
>   ?>
>}
>   ?>
> 
> which indeed, doesn't work.
> 
> The concept is very basic, there is an image, which contains the onClick
> event, it should get 2 variables (number both), which should be passed to
> the .get call on the jquery code to execute an action, immediately after
> animating (disappearing) the whole container for the image and text.
> 
> I need this, because the script is supposed to "update" a record on a
> database table, but i don't want the page to reload, so the person can
> keep working on whatever he is doing on the page.
> 

-- 
View this message in context: 
http://www.nabble.com/.get-question-related-to-external-variables-tp20433804s27240p20438991.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] .get question related to external variables

2008-11-11 Thread JLChafardet


Hello list, im trying to perform a very (not that easy to me it seems) easy
task.

Receive 2 variables from an onclick event, then animate, then execute a .get
action.

my code looks like this.
.


function getVars (str1,str2) {
var tc_id = str1;
var c_id = str2;

$(document).ready(function(){
$(".del").click(function(){
$(this).parents(".tags").animate({ opacity: 'hide' },
"slow").addClass("removed");
$.get('tareas.php', {
 a: 'u',
 t: 'rtc',
 tcid: tc_id,
 cid: c_id
});
});
});
};

.

 ../iconos/delete_16.png ','')" /> 


which indeed, doesn't work.

The concept is very basic, there is an image, which contains the onClick
event, it should get 2 variables (number both), which should be passed to
the .get call on the jquery code to execute an action, immediately after
animating (disappearing) the whole container for the image and text.

I need this, because the script is supposed to "update" a record on a
database table, but i don't want the page to reload, so the person can keep
working on whatever he is doing on the page.
-- 
View this message in context: 
http://www.nabble.com/.get-question-related-to-external-variables-tp20433804s27240p20433804.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.