embed graph and resuts into div in main page using js