473,406 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

saving xml in javascript

Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles

Oct 27 '06 #1
90 10969
ch**********@gmail.com wrote:

I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.save("Guestbook.xml");
Whether calling the save method successfully is allowed depends on the
host your script is used in. IE with normal security settings does not
allow that, I am not even sure lowering security settings will allow it.
It is however allowed to call save in a Windows Script Host script, in
an ASP page, in a HTML application (HTA), to name the most common hosts.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Oct 27 '06 #2
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Desidero appena dire che e un luogo ben cotto http://www.usate348.org/progetti

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Feb 21 '07 #3
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
mmm.. nice design, I must say.. http://www.bovso.org/amici

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Feb 23 '07 #4
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Guter Aufstellungsort, ja! http://www.flryanair.org/mondo

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Feb 25 '07 #5
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Luogo grande! Grande giusto! I miei riguardi migliori al proprietario:) http://www.canaxe.org/antivirus

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Feb 28 '07 #6
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Luogo molto buon:) Buona fortuna! http://www.canaxe.org/racconti

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Feb 28 '07 #7
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Very valuable information you have here. Thanks.. http://www.canaxe.org/entertainment

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Feb 28 '07 #8
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Desidero appena dire che e un luogo ben cotto http://www.canaxe.org/trasporti

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 1 '07 #9
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Stupore! ho una sensibilit molto buona circa il vostro luogo!!!! http://www.canaxe.org/veneto

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 1 '07 #10
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?
It is not possible, by JavaScript policy, to save a document in the
client side.

You might ask for that using a server side script writen in php for
example...
--
Une Bévue
Mar 1 '07 #11
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
I'll be BACK! :) ;) http://www.canaxe.org/videocamere

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 1 '07 #12
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
E evidente che il luogo e stato fatto dalla persona che realmente conosce il mestiere! http://www.canaxe.org/vetro

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 1 '07 #13
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Very valuable information you have here. Thanks.. http://www.canaxe.org/traduzioni

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 1 '07 #14
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Luogo molto buon:) Buona fortuna! http://www.canaxe.org/sexi

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 1 '07 #15
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Grande sito!! http://www.avwzioni.org/capelli

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 1 '07 #16
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Great site! Good luck to it's owner! http://www.avwzioni.org/nudi

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 2 '07 #17
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
luogo grande:) nessun osservazioni! http://www.avwzioni.org/molise

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 2 '07 #18
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Grand emplacement! La conception est merveilleuse! http://www.avwzioni.org/supereva

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 2 '07 #19
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Grande! Il luogo cose buon, tutto e abbastanza ragionevole e piacevole.. http://www.avwzioni.org/economici

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 2 '07 #20
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
WOW!! I like it! http://www.avwzioni.org/figa

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 2 '07 #21
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Interesting contents i consider.. http://www.bambini.batcave.net

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 2 '07 #22
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
http://www.bloggingmylife.com/?u=sessois

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 2 '07 #23
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
http://itsesso.beeplog.com

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 2 '07 #24
On Mar 1, 12:07 am, unbewusst.s...@google.com.invalid (Une Bévue)
wrote:
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

It is not possible, by JavaScript policy, to save a document in the
client side.

You might ask for that using a server side script writen in php for
example...
--
Une Bévue
>>>>>>>>>>>>>>>
It is not possible, by JavaScript policy, to save a document in the
client side.
>>>>>>>>>>>>>>>
This is only true if your web page is being served by a web server.
If the web page is a local file on a hard drive that you have rights
to, then the save method works. I use it all the time to write
browser-based applications that dont require a web server to exist on
the users machine. They just click a local html file fill out the
form and save away.
Mar 2 '07 #25
On Mar 2, 5:16 pm, "RickH" <passp...@windcrestsoftware.comwrote:
On Mar 1, 12:07 am, unbewusst.s...@google.com.invalid (Une Bévue)
wrote:


Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?
It is not possible, by JavaScript policy, to save a document in the
client side.
You might ask for that using a server side script writen in php for
example...
--
Une Bévue
It is not possible, by JavaScript policy, to save a document in the
client side.

This is only true if your web page is being served by a web server.
If the web page is a local file on a hard drive that you have rights
to, then the save method works. I use it all the time to write
browser-based applications that dont require a web server to exist on
the users machine. They just click a local html file fill out the
form and save away.- Hide quoted text -

- Show quoted text -

Also, for IE I would also suggest you instantiate the DOM in this
manner: as the class name you are using in the example will give you a
very old version 3 of the DOM, now that the DOM is installed side-by-
side on windows new releases, there is no longer a single clsid for
the DOM. The function below will return the most recent version that
the machine has installed. Also in your type of app make sure the
async property is set to false.

function getXMLDom() {
// Please use the highest version of XML that is currently installed
on your machine
var locXML
try {
locXML = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.6.0" )
}
catch(e) {
try {
locXML = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.5.0" )
}
catch(e) {
try {
locXML = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.4.0" )
}
catch(e) {
try {
locXML = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0" )
}
catch(e) {
try {
locXML = new ActiveXObject("MSXML2.DOMDocument.6.0")
}
catch(e) {
try {
locXML = new ActiveXObject("MSXML2.DOMDocument.5.0")
}
catch(e) {
try {
locXML = new ActiveXObject("MSXML2.DOMDocument.4.0")
}
catch(e) {
try {
locXML = new ActiveXObject("MSXML2.DOMDocument.3.0")
}
catch(e) {
}
}
}
}
}
}
}
}
locXML.async = false
locXML.validateOnParse = true;
locXML.resolveExternals = true;
locXML.setProperty("SelectionLanguage", "XPath");
if (typeof(locXML) == 'undefined') {
alert('Error: you must have the XML DOM installed')
return null
} else {
return locXML
}
}

Mar 2 '07 #26
On Mar 2, 5:23 pm, "RickH" <passp...@windcrestsoftware.comwrote:
On Mar 2, 5:16 pm, "RickH" <passp...@windcrestsoftware.comwrote:


On Mar 1, 12:07 am, unbewusst.s...@google.com.invalid (Une Bévue)
wrote:
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing.Any
thoughts or ideas on what I'm doing wrong?
It is not possible, by JavaScript policy, to save a document in the
client side.
You might ask for that using a server side script writen in php for
example...
--
Une Bévue
It is not possible, by JavaScript policy, to save a document in the
client side.
This is only true if your web page is being served by a web server.
If the web page is a local file on a hard drive that you have rights
to, then the save method works. I use it all the time to write
browser-based applications that dont require a web server to exist on
the users machine. They just click a local html file fill out the
form and save away.- Hide quoted text -
- Show quoted text -

Also, for IE I would also suggest you instantiate the DOM in this
manner: as the class name you are using in the example will give you a
very old version 3 of the DOM, now that the DOM is installed side-by-
side on windows new releases, there is no longer a single clsid for
the DOM. The function below will return the most recent version that
the machine has installed. Also in your type of app make sure the
async property is set to false.

function getXMLDom() {
// Please use the highest version of XML that is currently installed
on your machine
var locXML
try {
locXML = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.6.0" )
}
catch(e) {
try {
locXML = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.5.0" )
}
catch(e) {
try {
locXML = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.4.0" )
}
catch(e) {
try {
locXML = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0" )
}
catch(e) {
try {
locXML = new ActiveXObject("MSXML2.DOMDocument.6.0")
}
catch(e) {
try {
locXML = new ActiveXObject("MSXML2.DOMDocument.5.0")
}
catch(e) {
try {
locXML = new ActiveXObject("MSXML2.DOMDocument.4.0")
}
catch(e) {
try {
locXML = new ActiveXObject("MSXML2.DOMDocument.3.0")
}
catch(e) {
}
}
}
}
}
}
}
}
locXML.async = false
locXML.validateOnParse = true;
locXML.resolveExternals = true;
locXML.setProperty("SelectionLanguage", "XPath");
if (typeof(locXML) == 'undefined') {
alert('Error: you must have the XML DOM installed')
return null
} else {
return locXML
}

}- Hide quoted text -

- Show quoted text -- Hide quoted text -

- Show quoted text -
Oops, I'm finding my own bugs, the function previously posted should
end like this:

if (typeof(locXML) == 'undefined') {
alert('Error: you must have the XML DOM installed')
return null
} else {
locXML.async = false
locXML.validateOnParse = true;
locXML.resolveExternals = true;
locXML.setProperty("SelectionLanguage", "XPath");
return locXML
}

Mar 2 '07 #27
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Ich besichtige deinen Aufstellungsort wieder bald fur sicheres! http://www.2ire17.org/pokemon-porn

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 3 '07 #28
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
I'll be BACK! :) ;) http://www.2ire17.org/cristiana

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 3 '07 #29
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
luogo interessante, soddisfare interessante, buon! http://www.2ire17.org/aria

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 3 '07 #30
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Stupore! ho una sensibilit molto buona circa il vostro luogo!!!! http://www.2ire17.org/universita

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 3 '07 #31
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Dein Aufstellungsort verdient nur gute Woerter. Danke. http://www.2ire17.org/sicilia

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 3 '07 #32
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Du musst ein Fachmann sein - wirklich guter Aufstellungsort, den du hast! http://www.ojgetti.org/suonerie

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 3 '07 #33
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
9 su 10! Ottenerlo! Siete buoni! http://www.ojgetti.org/ciao-bella

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 4 '07 #34
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
9 su 10! Ottenerlo! Siete buoni! http://www.ojgetti.org/parma

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 4 '07 #35
RickH <pa******@windcrestsoftware.comwrote:
>
>>>>>>>>>>>>>>
It is not possible, by JavaScript policy, to save a document in the
client side.
>>>>>>>>>>>>>>

This is only true if your web page is being served by a web server.
If the web page is a local file on a hard drive that you have rights
to, then the save method works. I use it all the time to write
browser-based applications that dont require a web server to exist on
the users machine. They just click a local html file fill out the
form and save away.
right !

are you able to do that saving of a file with JavaSCript , which code ?

i do have an application for that :

the user select an area on the browser window and the javascript save
that part locally, usefull, for example when u read an article online
and want to avoid saving pub.
--
Une Bévue
Mar 4 '07 #36
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Great site! Good luck to it's owner! http://www.ojgetti.org/nude

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 4 '07 #37
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Nice site you have! http://www.ojgetti.org/wallpaper

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 4 '07 #38
On Mar 3, 11:30 pm, unbewusst.s...@google.com.invalid (Une Bévue)
wrote:
RickH <passp...@windcrestsoftware.comwrote:
It is not possible, by JavaScript policy, to save a document in the
client side.
This is only true if your web page is being served by a web server.
If the web page is a local file on a hard drive that you have rights
to, then the save method works. I use it all the time to write
browser-based applications that dont require a web server to exist on
the users machine. They just click a local html file fill out the
form and save away.

right !

are you able to do that saving of a file with JavaSCript , which code ?

i do have an application for that :

the user select an area on the browser window and the javascript save
that part locally, usefull, for example when u read an article online
and want to avoid saving pub.
--
Une Bévue

Actually, I'm wrong, you're correct about pure javascript. I've been
using the Micosoft ActiveX XMLDOM not the java XMLDOM, but my code is
still javascript. Here is the object I use:

locXML = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.5.0" )
//locXML = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.4.0" )
//locXML = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0" )
//locXML = new ActiveXObject("MSXML2.DOMDocument.5.0")
//locXML = new ActiveXObject("MSXML2.DOMDocument.4.0")
//locXML = new ActiveXObject("MSXML2.DOMDocument.3.0")

if (typeof(locXML) == 'undefined') {
alert('Error: you must have the XML DOM installed')
} else {
locXML.async = false
locXML.validateOnParse = true;
locXML.resolveExternals = true;
locXML.setProperty("SelectionLanguage", "XPath");
}
locXML.load(my file name)
locXML.save(my file name)

Sorry about the confusion, you do need activeX.
Mar 4 '07 #39
RickH <pa******@windcrestsoftware.comwrote:
Sorry about the confusion, you do need activeX.
OK, no prob ;-)

i think ActiveX doesn't exists on MacOS X right ?

in the past (about 8 years ago) it was a trick (really unusual and
complicated) to save a file, from Nestscape 4.0.x using JavaScript.

i don't remember the procedure.
--
Une Bévue
Mar 5 '07 #40
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
OOOOO! Luogo che molto buon avete! Saluti da Milano:) http://www.nuovi5y.org/dj-italia

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 5 '07 #41
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
sono eccitato circa questo luogo, buon lavoro!:) http://www.nuovi5y.org/figa

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 5 '07 #42
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Luogo grande! Grande giusto! I miei riguardi migliori al proprietario:) http://www.nuovi5y.org/fiorentina

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 5 '07 #43
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
OOOOO! Luogo che molto buon avete! Saluti da Milano:) http://www.nuovi5y.org/umbria

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 5 '07 #44
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Grande! Il luogo cose buon, tutto e abbastanza ragionevole e piacevole.. http://www.nuovi5y.org/tattoo

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 5 '07 #45
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Stupore! ho una sensibilit molto buona circa il vostro luogo!!!! http://www.nuovi5y.org/topless

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 5 '07 #46
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Grande sito!! http://www.cartk5e68.org/la-scala

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 6 '07 #47
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
i'am really impressed!! http://www.cartk5e68.org/keira-knightley

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 6 '07 #48
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Luogo interessante. Info molto importante, grazie molto! http://www.cartk5e68.org/pasta

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 6 '07 #49
Hi all. I have the following problem. I have an xml file, while I will
list below and I am trying to add nodes to the xml document based on
user input to a form.

The XML doc is ...

<?xml version="1.0"?>

<board>
<message>
<authorAuthor One </author>
<commentThis is the first test comment </comment>
</message>
<message>
<authorAuthor Two </author>
<commentThis is the second test comment </comment>
</message>
<message>
<authorAuthor Three </author>
<commentThis is the third test comment </comment>
</message>
</board>
The code I have to insert a new node is ....

<script type="text/javascript">
var xmlDoc;
var xmlObj;
var author;
var comment;
var message;
function loadXMLDoc() {

xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load("Guestbook.xml");
xmlObj=xmlDoc.documentElement;
processInput();
}

function processInput() {
var new_message=xmlDoc.createElement('message');
var new_author=xmlDoc.createElement('author');
var new_comment=xmlDoc.createElement('comment');
var new_author_text=new_author.createTextNode('author test
works');
var new_comment_text=new_comment.createTextNode('comme nt test
works');
new_message.appendChild(new_author);
new_message.appendChild(new_comment);
xmlObj.appendChild(new_message);
xmlDoc.save("Guestbook.xml");
}

</script>
Currently when I execute this is makes no change whatsoever to the xml
file. What I expected was to open the xml doc manually and see 4 child
nodes of the root instead of 3 as shown above in the xml listing. Any
thoughts or ideas on what I'm doing wrong?

Also of note is the above code is in the head section of a JSP file.
Just using JSP instead of HTML file but no jsp code is actually in the
file, just html.

Thanks,
Charles
Luogo grande! Grande giusto! I miei riguardi migliori al proprietario:) http://www.cartk5e68.org/alitalia

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Mar 6 '07 #50

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: James | last post by:
Situation: I have a page, built using document.write(). When I hit 'save as', IE goes and saves the contents of 'about:blank' to that file, rather than saving the HTML it's displaying in the...
0
by: Stu | last post by:
Hi, I want to be able to come up with some way of navigating around a system that allows me to save certain screen info (Say combo box setting) so that when returning to the screen from a link...
16
by: Fred | last post by:
hi, is there some way to prevent(at least for not so advanced users) image saving on local disk; currently i use javascript which handles the right mouse button click, but all it takes is to...
26
by: geolev | last post by:
I'm trying to understand the effects of the Daylight Saving Time rule changes for 2007 in the US. Can anyone tell me how Javascript knows when to apply Daylight Saving Time in the following script?...
27
by: RobG | last post by:
I was investigating a function to determine whether daylight saving was being observed on a particular date (given the platform's regional settings) and came across a suggestion at merlyn.com to...
3
by: =?Utf-8?B?UGhpbCBKb2huc29u?= | last post by:
Hi, I have a web application that will be hosted on servers with timezones configured to EST with daylight saving. My application takes an XML datafeed that contains times in GMT (also with...
7
by: Rohit | last post by:
I am trying to construct uclibc style timezone string(e.g. GMT +0IST-1,M3.5.0/01:00:00,M10.5.0/02:00:00) from javascript but do not know how can i get when DST starts and ends from my script.I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.