Yes, i believe i can do that with java script, but i dont know how to do that.
I can use in javascrit eval('url') to load a page, then i can load the same page after the user had maked any change in the drop down menu calling a java script function on the event "onchange".
This is an example that i'm trying to do:
**<file name is testdoc.php>
<head>
<title>Test Doc</title>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function LoadPage(obj)
{
/can i invoke post method here?!/
eval("location='"+obj.options[obj.selectedIndex].value+"'");
}
// End -->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="../php/submit.php">
<p>
<?php echo("<textarea
//here is the point that i could access
//directly the text area value filled before
//by the user
name=\"mytextarea\">$mytextarea</textarea>");
?>
</p>
<p>
<select name="select" onchange='LoadPage(this)'>
<?php
$link = mysql_pconnect("localhost", "root", "");
mysql_select_db("coresup",$link);
$query = "select distinct family from product";
$result = mysql_query($query,$link);
echo("<option value='testdoc.php'>All</option>");
while($row = mysql_fetch_array($result)){
echo("<option value='testdoc.php?changedval=".$row['family']."'");
if($changedval == $row['family'])
echo(" selected");
echo(">".$row['family']."</option>");
}
?>
</select>
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
</body>
then, i dont know if its possible, but i'm trying to find a way to invoke the post method using javascript or php. Because if it is possible i can access directly the text area value in the php script just using a variable named with the same name of the text area.
I need that because the page will not lost the data typed in the text area before the user had changed the drop down menu.
Sugestions are appreciated too.
Thanks again,
Adriano