Issue in saving and Web page not loading

  1. I am auto populating a child table from a doctype to another doctype. My issue is the auto populated doctype is not saving. I have to manually save. after that only it is updating in database. Buy auto populate is happening and it is showing in UI.

  2. I have created a web page. In the web page I am fetching data from a doctype. Now my problem is when I open for the first time data is not fetched. It is fetching only when I open my doctype.

I am going to use the web page without login also. So that time also, My web page is working when I open my doctype in back round.

Is there any solution for it?