Click to See Complete Forum and Search --> : Saving HTML Form Data to XML....... Need Help......


zhixiong
12-20-2002, 03:03 AM
Pls look at the link below so as to understand my problem..... the page is short so pls look at it

http://www.xmlfiles.com/articles/michael/htmlxml/default.asp

For the above link, the datas are being saved to xml using 'processForm.asp', if i cant use 'ASP' and my only choices are 'JSP' or 'Java' , 'XSL' to display. Can it be done???

Any websites that have similar examples or links will be greatly thankful.....

Tricky123
12-20-2002, 11:36 AM
I have used this code:

<html>
<form name ="MyForm">
<script language="JavaScript">
function writeXML()
{



var One = document.MyForm.noentry.value;
var Two = document.MyForm.Entry.value;

var text = "<?xml version='1.0' encoding='ISO-8859-1'?>"
text = text + "<showme>"
text =text + "<data>"
text = text + "<first>" + One + "</first>"
text = text + "<second>" + Two + "</second>"
text = text +"</data>"
text = text + "</showme>"

alert(text)
}
</script>
<textarea cols="20" rows="5" name="noentry"></textarea>
<textarea cols="15" rows="6" name="Entry"></textarea>
<input type="button" value="click" onClick="return writeXML()">
</html>

Hope this helps!!

(note, it gets harder when you want to return radio item values and the like)

zhixiong
12-20-2002, 09:40 PM
Thks alot Tricky123. I am not very good at programming. I hope you will be able to help me if i have further questions.

:)

Tricky123
12-21-2002, 03:34 AM
No problem :D