Change CharField value after init
This seems overly complicated. Apart from anything else, tying up an entire process waiting for someone to fill in a form is a bad idea.
Although I can't really understand exactly what you want to do, it seems likely that there are better solutions. Here's a few possibilities:

Page A redirects to Page B before initializing the form, and B redirects back to A on submit;
Page A loads the popup then loads the form via Ajax;
Page B dynamically fills in the form fields in A on submit via client-side Javascript;

and so on.
I have a page "A" with some CharField to fill programmatically. The value to fill come from another page "B", opened by javascript code executed only when the page is showed (after the init). This is the situation:

page A __init__
during the init, start a thread listening on the port 8080
page A initialized and showed --> javascript in the template is executed
the javascript tag opens a new webpage, that sends data to the 8080
the thread reads data sent by page B, and try to fill CharFields

Is there a way to do this? I don't know...a refresh method..
If it is not possible... 

I need a way to call the javascript function before the init of the
form
OR
A way to modify the HTML code of the page created