Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem passinng text box value to next page

Status
Not open for further replies.

keith23

Technical User
Joined
May 26, 2005
Messages
97
Location
NL
Hi all. i got a page that it has a text box and drop down box. I want to the user to be able ito type and select drop downbox and then by clicking a button both value get pased to next page. At this moment the page is only passing value of drop down box not value of text box typed. searchprocess.php?m=title&s=chida
Could any one help me fix this problem.Thanks

Code:
<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>Untitled </title>

<script type="text/javascript">
<!--



function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}



function MM_jumpMenuGo(selName,targ,restore){ //v3.0
  var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}
// -->
</script>

</head>

<body>

<table border="0" cellspacing="0" width="90%" id="table1"
style="border-style:dashed&gt;
	&lt;tr&gt;
		&lt;td&gt;
		&lt;p align="
center">
    <tr>
        <td><b><i>::: Search </i></b><font color="#FF0000"><b><i>New</i></b></font>
        ::: <br>
        [B]<form action="searchprocess.php" method="GET" name="form1">
            <p><input type="text" size="20" name="s"> </p>
        </form>[/B]
        </td>
    </tr>
</table>



[B]<form name="form1" method="post" action="">
		  <select name="zoodKhiz" onChange="MM_jumpMenu('parent',this,1)">
		    <option selected>Select a Singer</option>
<option value="searchprocess.php?m=artist">Search By Artist</option>
<option value="searchprocess.php?m=title">Search By Title</option>
<option value="searchprocess.php?m=album">Search by Album</option>

          </select>
		  
	    </form>[/B]

</td>
</body>
</html>




 
And really - that Macromedia code is just pants. You would do a lot better to scrap it, and use minimal clean JavaScript to achieve the result.

I cannot believe they give away such dross (using eval for example). It sets a bad example for beginners.

Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top