Jump to content

Refresh listbox when new data is found in database


gdfhghjdfghgfhf

Recommended Posts

ok i have a weird problem, i don't know how to explain it so here is my situation:

 

I have a page to add events on a calendar for music shows (a form with a submit button)...

On this page, the users adding an event must select the bands from a listbox. This listbox displays the bands from a table in my database.

 

If a band present in this show is not listed, the users can click a link that will open a popup (i can put it on the same page too), and they can add a band to the database, so it will be listed with the others in the listbox.

 

My problem is that after the band is added to the database, my users dont see it in the listbox unless they refresh the page, and if they do they will loose all datas they entered (descriptions, flyer, date, category, etc)

 

How could I avoid this?

 

I thought about javascript, but since the content of the listbox is from a SQL query, it won't work right?

I thought about putting the listbox inside a iFrame, but then it won't be included in the form since it's a different page...

 

 

any suggestions?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.