Link to home
Start Free TrialLog in
Avatar of neil109
neil109

asked on

reloading a form using php and including number of feilds depending on selection

i need to reload the page when a option is selected in a menu/list of a html form. i understand how to do the rest, its just getting it to reload when the selection is hit and passing a variable through the url

any ideas??

neil
Avatar of carchitect
carchitect

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
</head>

<body bgcolor="#FFFFFF">
<form method="post" action="">
  <select name="select" onChange="MM_goToURL('parent','gotosame.htm');return document.MM_returnValue">
    <option value="1" selected>Hi</option>
    <option value="2">Reload</option>
  </select>
</form>
</body>
</html>
or

<html>
<body>
<form method="post" action="">
  <select name="select" onChange="self.location.href('filename.htm')">
    <option value="1" selected>Hi</option>
    <option value="2">Reload</option>
  </select>
</form>
</body>
</html>
Avatar of neil109

ASKER

i need to parase the variable thats selected into php so if "html" was selected in the box then it would go to file.php?include=html how would i do that? just add the php into the java?
ASKER CERTIFIED SOLUTION
Avatar of carchitect
carchitect

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of neil109

ASKER

cheers for that saved me hours of racking my brain
o thx we are here to share our knowledge
Avatar of neil109

ASKER

is there a way i can get it to pass all the rest of the form through onto the other page?