0

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

2
Contributors
5
Replies
7
Views
6 Years
Discussion Span
Last Post by dimasalang
0

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

0

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.

0

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?

0

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.

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.