This week's book giveaway is in the Testing forum.
We're giving away four copies of Practical Unit Testing with TestNG and Mockito and have Tomek Kaczanowski on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes how to store the selections made?? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "how to store the selections made??" Watch "how to store the selections made??" New topic
Author

how to store the selections made??

Sri Sar
Ranch Hand

Joined: Mar 25, 2004
Posts: 44
Hi,
using HTML/JS i have created a graphical interface as follows:
in page 1, the user has a set of icons displayed on the screen.
when the user clicks on the first icon, he can choose a map using the
<select> and <option> tags. in the code, as soon as the user selects a
map, that is displayed on the screen.

<script language="javascript">
function loadFile() {
var fileName = document.theForm.sel.value;
if (fileName != "") {
location.href = fileName;
}
}
</script>

<body>
Please Choose the map u prefer and after the map has been displayed,click
on the "Back" button
<form name="theForm">
<select name="sel" onchange="loadFile();">
<option> Choose the map u prefer
<option value="C:\My Documents\usa.jpg" height=50 width=20>US
</select>
</form>
now the user clicks the back button and goes back to the home page. then he can click on the second icon and using similar code, he is allowed to select text files now instead of maps.
now the selections made by the user are sent to a server that gets
these inputs and does necessary calculations.
my question is that as soon as the user selects a map (or a text
file), is it possible to store the user selections in some way (as a
variable or a XML file... etc) so that a server can interpret these data
and do necessary processing.
thanks in advance.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
You can store it wih a server side language and that is the only real way to do it.
With javascript you can store it in an xml file, but you are looking at using Active-X which means only IE supports it.
 
 
subject: how to store the selections made??
 
Threads others viewed
generating XML using servlets/jsp
using javascript to create XML
generating dynamic XML
advise on using XML in the application
generating tags when submit button in clicked
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com