J
Jake Barnes
My thanks to everyone who helped answer my last two questions. You've
all been quite a help to me as I try to learn a bit more about
Javascript this weekend. I've one more question, though I'm not sure
this is the right place to ask it. If you go to this page:
http://www.publicdomainsoftware.org/ajaxExperiment.htm
and click in a box to get the controls, and maybe add some text, then
click the "save" link, This function gets triggered:
function savePage() {
hideDiv("communicationBox");
hideDiv("controller");
hideDiv("deleteBox");
var pageContent = document.documentElement.innerHTML;
askForInput("Your page has been saved", "");
hideDiv("inputBox");
hideDiv("submitButton");
referenceToNewDiv = addItem("inputDiv", "div");
referenceToNewDiv.id = "showSaveResults";
var url = 'savePage.php';
var pars = 'pageText=' + pageContent;
var target = 'showSaveResults';
var myAjax = new Ajax.Updater(target, url, {method: 'post',
parameters: pars});
}
I've not yet incorporated some of the good advice I've been given on
this newsgroup. However, on an unrelated topic, I notice now that I'm
not getting all the HTML. Look at this page, it cut off part way:
http://www.publicdomainsoftware.org/ajaxTest/Tuesday_02_07_2006_9_48_57_PM.htm
This was working and now it isn't. I haven't changed my PHP code so
that can't be the problem (its only 12 lines anyway). The PHP code ads
the beginning and end HTML tags, but otherwise doesn't do much other
fwrite() the file to disk.
Perhaps I should ask in a different forum, but can anyone imagine why I
would not get all the HTML?
all been quite a help to me as I try to learn a bit more about
Javascript this weekend. I've one more question, though I'm not sure
this is the right place to ask it. If you go to this page:
http://www.publicdomainsoftware.org/ajaxExperiment.htm
and click in a box to get the controls, and maybe add some text, then
click the "save" link, This function gets triggered:
function savePage() {
hideDiv("communicationBox");
hideDiv("controller");
hideDiv("deleteBox");
var pageContent = document.documentElement.innerHTML;
askForInput("Your page has been saved", "");
hideDiv("inputBox");
hideDiv("submitButton");
referenceToNewDiv = addItem("inputDiv", "div");
referenceToNewDiv.id = "showSaveResults";
var url = 'savePage.php';
var pars = 'pageText=' + pageContent;
var target = 'showSaveResults';
var myAjax = new Ajax.Updater(target, url, {method: 'post',
parameters: pars});
}
I've not yet incorporated some of the good advice I've been given on
this newsgroup. However, on an unrelated topic, I notice now that I'm
not getting all the HTML. Look at this page, it cut off part way:
http://www.publicdomainsoftware.org/ajaxTest/Tuesday_02_07_2006_9_48_57_PM.htm
This was working and now it isn't. I haven't changed my PHP code so
that can't be the problem (its only 12 lines anyway). The PHP code ads
the beginning and end HTML tags, but otherwise doesn't do much other
fwrite() the file to disk.
Perhaps I should ask in a different forum, but can anyone imagine why I
would not get all the HTML?