Re: Passing variable to a page in a frameset

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

 



>
> In the <head> of my page, I have this:
>
> <script type="text/javascript">
> function submitForm(var1,var2) {
>  top.mainFrame.document.my_search.text1.value = var1;
>  top.mainFrame.document.my_search.text2.value = var2;
>  top.mainFrame.document.my_search.submit();
>  document.search_form.submit();
> }
> </script>
>
> If I type in a word in the search box http://beta.menashalibrary.org/about and
> hit enter, it searches the catalog just fine, but then just replaces the
> current page with the search results. If I click on the SEARCH link with the
> javascript, it does nothing.



It looks like you haven't adapted the example I gave you to conform to your
page/form structure.

top.mainFrame.document.my_search.text1.value = var1;

The frame you are populating may not be named mainFrame
The form in your destination frame may not be named my_search
The input in you destination frame may not be text1

You have to modify these areas to suit your application and add or remove
more as needed.

[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