Hello, I am getting full HTML page as response & that HTML contains HTML code, CSS, Javascript, images etc. & I am passing this HTML to Javascript's innerHTML function. It is executing all code except my Javascript(inline & external). How can I achieve this? Please help me. Thank in advance.
Hi. Pasting full HTML page as innerHTML doesn't seem okay, because your page will then have 2 <body>ies. That just doesn't validate, no? You might want to filter/ parse it first to specific section first before pasting. Also, some adjustments to the URL might be needed if there're external resources (CSS, javascript and images) inside that pasted page. Have a link I may see?
As hdewantara said, we'd really need to see your code to weight in more about what's wrong -- though this is 2013, not 1998... begging the question "why are you using innerHTML". More so, why are you trying to put javascript IN your innerHTML? Doesn't sound the least bit kosher. Of course, if none of it's executing, are you seeing any errors in your browser's error console?