On May 5, 11:10 am, Ugo <priv...@nospam.itwrote:
Quote:
[cut]
>
Quote:
But, once a selection is made, how do
I print the values to the page?
>
I'm not sure to understand your request, howover I write 2 code rows that
could be a start code:
>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
window.onload = function()
{
document.forms[0].b.onclick = function()
{
var form = this.form;
form.t.value = '';
for( var i = 0, max = form.s.options.length; i < max; ++i )
if( form.s.options[i].selected )
form.t.value += form.s.options[i].text + '\n';
}}
>
</script>
</head>
>
<body>
<form>
<select name="s" multiple="multiple" size="4">
<option>opt1</option>
<option>opt2</option>
<option>opt3</option>
<option>opt4</option>
<option>opt5</option>
<option>opt6</option>
</select>
>
<textarea name="t" rows="4" cols="10"></textarea>
<br />
<input type="button" name="b" value="write" />
</form>
</body>
</html>
Well, we have a large DIV in the middle of the page, which gets it's
values from a PHP select to a MySQL Database,
<? PHP CODE ?>
<combo box>
<div id="innertable>
..
..
..
like 20 lines of code
</div>
Basically, when the value in the combo box changes, I want to refresh
the DIV with the corresponding values from the database. They do not
want to refresh the page.
So, I figure that somehow I can use some external page to query the
new data and refresh the DIV......
Never used AJAX, so I'm going to avoid that. Any ideas? Can
innerHTML help me here?
Thanks!
John.