hello.. just want to ask if it's possible to save html form field values in an xml file without using any server side script like ajax or php. i just want to use javascript and i want to do it offline witthout using any server like tomcat. is it possible? thanks in advance

so far i'm using Java to create xml from html form field values but my question is if it's possible to do it with javascript alone? please reply anyone. thanks

you cannot write to a file on a server using javascript, so no what you are wanting to do is not possible, since you are using java you need to use java to open,close,and read or write to a file.

another question sir. can i load a local xml using javascript? w/out using local server? as for the time being i'm using jquery .ajax to load xml file but the requirement is to load the xml locally. some kind of a stand alone web app.. is it possible?

where is this 'local' xml file? not following what you are trying to do. perhaps explain the goal of your project, show some code so I can see what you are doing.

well the location of the 'local' xml is in my hard drive not in the server .. local as in in the local file system . currently here is the code that im using

<script type="text/javascript">
		$(document).ready(function(){
			$("input.load").click(function(){
			$.ajax({
				type: "GET",
				url: "props.xml",
				dataType: "xml",
				success: function(xml) {
					$(xml).find('SO').each(function(){
						var id = $(this).attr('id');
						//alert(String(id));
						var xvalue = $(this).find('value').text();
						oForm = document.forms['myForm'];
						oField = oForm.elements[String(id)];
						oField.value = xvalue;
						});
					}
				});
			});
		});
		</script>

but that's not what i want. the goal is to load an xml file from the local file system without running any server side script like that one above.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.