Kwiki-JSLog

 view release on metacpan or  search on metacpan

lib/Kwiki/JSLog.pm  view on Meta::CPAN

		}
	}

	/*
	Public method to set any amount of text into the text area
	*/
	function text(sText) {
		$(sDOMInstance+"_textArea").value=sText;
	}
	/*
	Public method to try to get the innerHTML of the element identified in the text input box, and place it into the clipboard
	from view.
	*/
	function getHTML () {
		var sIdToInspect = $(sDOMInstance+"_idToInspect").value;

		if (sIdToInspect == "" ) {
			warning("Provide a non-blank id");
		} else {
			try {
				// get the element with the id entered, copy its outerHTML to a hidden text area, and then transfer it to the clipboard
				var oTextArea = $(sDOMInstance+"_textArea").value = $(sIdToInspect).innerHTML;
				info(sIdToInspect+" innerHTML is now in the text box below!");
			} catch(e) {
				error("Could not get innerHTML of id="+sIdToInspect+": "+e.message);
			}
			// finally, persist the id that was entered in a cookie
			EC.F.setCookie(sInstance+"_idToInspect",sIdToInspect);
		}
	}



( run in 1.027 second using v1.01-cache-2.11-cpan-84e82930d8c )