Re: Re: Passing variable to a page in a frameset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
> That is exactly what I want. I apologize for the confusion. I was having a
> hard time trying to put what I was trying to do in words. But, yes, your
> second paragraph is exactly what I want to do. My knowledge of PHP is very
> limited, and I've tried to search for something that will do this, but
> couldn't find anything.
>
> - jody


In that case, I would not use frames at all.  I believe in the top frame all
you wanted to store was the search text, right?

Just have your search link do something like this:

<html>
<head>
<script language="JavaScript">
<!--
function submitForm() {
 document.search_form.action='
http://beta.menashalibrary.org/sites/beta.menashalibrary.org/themes/salamander/searchframe.html
';
 document.search_form.submit();
}
//-->
</script>
</head>
<body>
<form name="search_form" method="post" action="">
<input type="text" name="search_name" value="">
<a href="javascript:submitForm()">SEARCH</a>
</form>
</body>
</html>

And then on
http://beta.menashalibrary.org/sites/beta.menashalibrary.org/themes/salamander/searchframe.html
just
assign your posted search value and make a hidden form field.
<html>
<head>
<body>
<?php
$searched_text = $_POST['search_name'];
?>
<form name="my_search" method="post" action="">
<input type="hidden" name="search_text" value="$searched_text">
<table width='800' border='0' align='center' cellpadding='2' cellspacing='2'
bordercolor='#000000'>
<tr>
<td><?php echo "You searched for: ".$searched_text; ?></td>
</tr>
</table>
</form>
</body>
</html>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux