Jquery - html - Javascript - Refresh fields from the page when registering information [closed]

1

Good evening

Initially, thank you in advance for those who somehow help me.

So, in fact, I do not even know how to search this on google, so I decided to write here to see if there is anything like this.

My question is the following, for example, I have a web system that works with windows ( link ), and I have the screen of user registration and the city register.

When registering a new city, I wanted the city field in the user registration window to update the cities to receive this new one. Okay, I know, I can do this by manually updating it and tals. But that is not the intention. It's automatic.

Is there any library or whatever, any idea for that?

Thank you

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

NOTE: In the users window I do not have the city field yet, as I was thinking of how to do ... rsrsrs

And for example, if I already had the city field in the users window, when I opened the page, in the ajax request I would already do a select with the cities registered in the bank.

However the problem is after it is already open. Well the problem is this, now I only have the open windows users who need to update the city field. But if in the future I open another jenela that also owns the city field, then it will not update because I just programmed it on the users page to insert a new city. rsrsrsrss

It's kind of a pyre, but I saw it in a vehicle tracking system (traccar.org) in java, and he also worked with a window, and when inserting a vehicle, it automatically entered that vehicle record in all fields of the other windows that had the option of choosing vehicles.

I apologize, I tried to search something to see if I could think of something, but the problem is that I do not even know how to play this on google.

Not to say I did not think of anything, just get the idea I had. I thought of putting all the city fields, of all windows with the class = 'city_update', 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 get that new record and update in all fields through the class = 'ciudad_atualiza'. What do you think? It was a crazy idea ... rsrsrs

Thank you for your attention!

    
asked by anonymous 25.11.2016 / 23:41

0 answers