Re: calling html file from within javascript

2015-12-14 Thread Gary Roach
Hi Gergely I agree that document.write is a bad idea. Freezing in this case may be a poor choice of words. I was trying to convey that the code executes OK until it gets to the .write line and hangs up. It never completes the .write line. As for purpose. Main.html is a template contains the

Re: calling html file from within javascript

2015-12-13 Thread Gergely Polonkai
Sorry, I have pressed Send too soon… As you see, using document.write is a very bad idea. However, freezing is not mentioned in that document. What does freezing mean in this case? Are you sure it's this code that gets executed and freezes? Also, what exactly do you want to achieve? Best, Gergel

Re: calling html file from within javascript

2015-12-13 Thread Gergely Polonkai
Hello, although this is barelyDjango related, here are some notes. >From MDN[1]: Note: as* document.write* writes to the document *stream*, calling *document.write* on a closed (loaded) document automatically calls *document.open* which will clear the document

calling html file from within javascript

2015-12-13 Thread Gary Roach
I use javascript in my main.html (top template) to control the access to several buttons. The buttons call a javascript function. This setup works exactly as I wish except the buttons still don't really do anything. I need to have each button load a different template. The pertinent script is: