Question: in my app i'm using a scroll View (paging). each view in the scroll view (UIImageView) contains an image and each image has tags (buttons) scattered all over the pic. so here is my code:

```
for (int i = 0; i < self.pictures.count; i++)
    {
        //The first loop is to loop to every picture
        int nbOfTags = classObject.tagsImages.count;

        for (int j = 0; j < nbOfTags; j++)
        {
            //Second loop is to loop to each tag corresponding to the picture

            ListTags *listTags = [[ListTags alloc]init];

            NSMutableArray *tagInfo = [[NSMutableArray alloc]init];

            listTags = [tagInfo objectAtIndex:j];

            float tagX = [listTags.tag_x floatValue];
            float tagY = [listTags.tag_y floatValue];
            float x = 1024*i+ tagX;
            float y = tagY;

            CGRect rect = CGRectMake(x, tagY, 20, 20);
            UIButton *button = [[UIButton alloc] initWithFrame:rect];

            UIImage * buttonImage = [UIImage imageNamed:@"blueCircle.png"];

            [button setBackgroundImage:buttonImage forState:UIControlStateNormal];

            [self.scrollView addSubview:button];
        }
    }

```

problem: when i run the code i can't see the buttons (tags) on the picture. if i replace "i" with "j" in 

> 
> float x = 1024\*i+ tagX;
> 
> 
> 

the buttons can be seen, however it's not the desired coordinates. so why "i" can't work? am i doing anything wrong or missing anything?

Answer: 
Here is your code which has been updated

```
$.post("categories.php?action=get&last_msg_id="+ID+"&cid="+CID,

```

Here is how you should be doing this since you are not POSTing

```
$.get('categories.php', {'action':'get','last_msg_id':ID,'cid':CID}, function(data){ // your code });

```
Use `.get()` since you're not actually sending any values through $\_POST

```
var ID=$(".productsc:last").attr("id");
var CID=$(".productsc").attr("cid");
$.get("categories.php",
    {
        action: 'get',
        last_msg_id: ID,
        cid: CID
    },
    function(data){
        if (data != "") {
            $(".productsc:last").after(data);           
        }
        $('div#last_msg_loader').empty();
});

```