Multiple Event Handles for Upload on a single page

QuestionsMultiple Event Handles for Upload on a single page
Greg asked 8 years ago


I have a scenario where I am using the Tab control to allow users to toggle between two grids.

Each grid allows for the upload of an image, each grid has it's own custom add/delete/update event handlers that are completely separate from one another (name, php variable name, etc).

When I run the page, only one grid (the last one added) can handle the upload correctly. The first grid to display on the page will "allow" the file to look like it has been uploaded but will not actually upload anything. When I remove the second grid, the first grid works fine.

Are there any hidden global variables that I need to set?

When associating my events to each grid – I am setting the last variable to "true".

Thank you – Greg

7 Answers
Abu Ghufran answered 8 years ago

I'm regenerating the case here and let you know the results.

Abu Ghufran answered 8 years ago

I tested tabbed 2 grid with upload function but both works as expected. Unable to generate this issue.

I've emailed you latest build, Kindly check the uploading issue after updating attached file in lib/inc.

If still does not work, Please check if there is any JS error using f12 debug console.
Last option, i might need code+db to regenerate the case.

Greg answered 8 years ago

This did not work, I have sent you a direct email.

Would you have a code sample?

Thanks – Greg.

Abu Ghufran answered 8 years ago

Here is the code:

To test run:
Set database accordingly if required.

Add record in each grid
Sort by id desc -> Will show recently added record.

Greg answered 8 years ago


I don't think this code will work.

In my scenario, the uploads are going to two completely different tables so I have wired up the Add/Update/Delete events to each grid (i.e., not re-using them as in the code sample).

I believe this is where the problem could be occurring.

Also, in my code, I have all the grid, event, column variables completely segregated as well as all the events (with completely different names) and the output and list variables are completely separate as well.

Are you able to do multiple events on the page?

Thanks – Greg

Abu Ghufran answered 8 years ago

I am unable to generate this case and events should not mix up things.
Perhaps, you can try debugging it by checking response code of ajax calls on upload & submit.

Please share you code for review.

Greg answered 8 years ago


Thank you for all your help on this.

I actually started to notice that the grid was not displaying the image correctly and in the information in my "condition" key for my upload was getting confused (i.e., kept appending the URL into that upload field and then it would not display properly).

I ended up disabling the "Show" functionality inside the grid and just show the path and this now works 100%.

Thank you.

Your Answer

8 + 1 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?