Jquery - html - Javascript - Update page fields when registering information

Asked

Viewed 463 times

1

Good night

First of all, I thank you for the attention of those who help me in some way.

So, actually, I don’t even know how to google this, so I decided to write here to see if there’s anything like this.

My question is the following, for example, I have a web system that works with windows (http://jspanel.de/), and I have the user registration screen and the city registration.

When registering a new city, I wanted the city field in the user registration window to update the cities to receive this new one included. Okay, I know, I can do this manually it update and tals. However the intention is not that. It is to be something automatic.

Is there a library or, I don’t know, an idea for that?

Thank you


So, complementing and answering the questions, yes, these windows are loaded by ajax, but each one does its search when initialized.

inserir a descrição da imagem aqui

OBS.: In the users window I don’t have the city field yet because I was thinking about how to do...

And for example, if I already had the city field in the user window, when opening the page, in the ajax request I would already select the cities registered in the bank.

However, the problem is after it’s already open. Because the problem is this, now I only have the window users open that needs to update the city field. But if in the future I open another jenela that tbm own the city field, then it will not update pq I just programmed on the users page to insert a new city. rsrsrsrss

It’s kind of crazy, but I saw it in a vehicle tracking system (traccar.org) in java, and it also worked with windows, and when inserting a vehicle, it automatically already inserted that vehicle registration in all fields of the other windows that had as option the choice of vehicles.

I’m sorry, I tried to search something to see if I could think of something, but the problem is I don’t even know how to google it.

Not to mention I didn’t think of anything, check out the idea I had. I thought of putting all the city fields, of all the windows with class='updated' and a script (javascript or jquery), using a socket connection. Then, when registering a new city the server itself will give me a return with this new record added, and I take this new record and update in all fields through class='updated'. What do you think? It was a crazy idea...

Thank you for your attention!

  • how the city field in the user registration window is shown? Is it a select? Put a code snippet from the registration form, it’s easier for staff to help

  • Hello, how do you fill cities today? Is it an ajax request? If it is, you just make a new call to the function that loads the cities right after including a new one.

  • Can you join the HTML you have and how cities are being shown before adding new ones? Another thing, this log is done on the server as well?

  • ta clarified above!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.