Re: Passing variable to a page in a frameset

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

 



>
> > Hello,
> >
> > I've got a website here: http://beta.menashalibrary.org/about
> >
> > On every page, i've got a search box at the top. This search box searches
> > the library's web catalog. The problem is, when someone searches, it
> takes
> > them away from the site. What I'd like to do is take what a person
> searches
> > for, and load it into the bottom frame of this page:
> >
> >
> http://beta.menashalibrary.org/sites/beta.menashalibrary.org/themes/salamander/searchframe.html
> >
> > Is there a way, with php, to take what someone puts in the search box and
> > put the results into the bottom frame of a frameset when the originating
> > page does not contain frames?
> >
> > - jody


Bastien is right, this is more of a Javascript issue.

It can be accomplished very easily by doing the following.

Once the user enters the search criteria have the submit button/link call a
javascript function like the following:

function submitForm(var1,var2) {
 top.leftFrame.document.my_search.text1.value = var1;
 top.leftFrame.document.my_search.text2.value = var2;
 top.leftFrame.document.my_search.submit();
 document.search_form.submit();
}

And this would be your submit link:

<a
href="javascript:submitForm(document.search_form.var1.value,document.search_form.var2.value)">SEARCH</a>

[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