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.
.....

<script type="text/javascript">
        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
                        });
                });
        });
        };
</script>
.....
<?php
                while ( $array = mysql_fetch_array ( $res, MYSQL_ASSOC ) ) {
                        ?>
        <div id="tags" class="tags"> ../iconos/delete_16.png ','<?php echo $id;
?>')" />&nbsp;<?php
                        echo $array ['palabra_tagcloud'];
                        ?></div>
<?php
                }
                ?>

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.

Reply via email to