Saturday, 31 August 2013

Load HTML Page In Textarea

Load HTML Page In Textarea

I've been trying to load a html document into a textarea when the page loads.
I know you can use the ajax load api in JQuery...
$("#siteloader").load('startup.html');
but if I try to load this into the textarea...
var mirror = $("#pageloader"),
input = $("#pagecode");
input.val(mirror.load('startup.html'));
I get [object Object] which I figured wouldn't work, but thought I'd try
it anyway as I just didn't know if it would work or not.
Any help on how to do this would be greatly appreciated.

No comments:

Post a Comment