I am using JQuery to create "applications" for my website. My issue is that I can't find the proper syntax for pulling the text of an html document into a string, so that the "application" button opens a window with an html file inside.
$('.openbuttonapp').dblclick(function () {
var $objWindow = $('<div class="window"> Put me in, Coach! </div>');
This function already successfully uses a string to create a window with html elements. However, my current program lacks the ability to easily modify, style, and organize my components.
I figure the proper code will look something like:
var entireDocumentHTMLAsAString = document.documentElement.innerHTML;
$('.openbuttonapp').dblclick(function () {
var $objWindow = $(entireDocumentHTMLAsAString);
However, this clearly didn't work out. All assistance is appreciated.
edit: My problem is that I need to succinctly reference whole html pages without writing for a string within the variable. Right now, the function works by creating a window with that html text string inside. Instead of a string, I want to place any html document.
Via Active questions tagged javascript - Stack Overflow https://ift.tt/JqR4nyz
Comments
Post a Comment