Re: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Dan Shirah

 Frames?!

 As a fellow Wisconsinite and a web developer, I'm going to have to ask you
 to leave the state.  Minnesota can have you.

 :P


 Jay


 PS -  No, but seriously, frames?!?!


There's nothing wrong with a Frame every once in a while!  Granted they
aren't used much anymore, but sometimes they can be useful!


RE: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Boyd, Todd M.
 -Original Message-
 From: Dan Shirah [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 15, 2008 9:20 AM
 To: Jay Moore
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] Re: Passing variable to a page in a frameset
 
 
  Frames?!
 
  As a fellow Wisconsinite and a web developer, I'm going to have to
 ask you
  to leave the state.  Minnesota can have you.
 
  :P
 
 
  Jay
 
 
  PS -  No, but seriously, frames?!?!
 
 
 There's nothing wrong with a Frame every once in a while!  Granted
they
 aren't used much anymore, but sometimes they can be useful!

I believe frames and framesets are being phased out of XHTML altogether.
It's all about DIVs nowadays. I think there's an XHTML specification for
something like frames, but it's just as ugly.


Todd Boyd
Web Programmer




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Jody Cleveland


On Aug 15, 2008, at 9:20 AM, Dan Shirah wrote:



Frames?!


As a fellow Wisconsinite and a web developer, I'm going to have to  
ask you

to leave the state.  Minnesota can have you.

:P


Jay


PS -  No, but seriously, frames?!?!



There's nothing wrong with a Frame every once in a while!  Granted  
they

aren't used much anymore, but sometimes they can be useful!


I know, I know. I'm not a fan of frames either, and have never even  
thought of using them until now. The problem is, our library catalog  
is on a different server and provides results for a consortium of 30  
libraries. So, what we've been doing is including a search box for the  
catalog on web pages. Which works fine, but it's easy for people to  
get caught up in the catalog with no good way to get back to the site  
you came from. So, I created a frame page that has a small button in  
the top frame that takes you back to where you came from. So, the site  
itself isn't using frames, only when you search the catalog. Of  
course, that's if I can get it working...


- jody

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Warren Vail
Actually you may want to check back with basic html at the target
parameter on your search form statement.

HTH,

Warren Vail
Vail Systems Technology
[EMAIL PROTECTED]
 
 

 -Original Message-
 From: Jay Moore [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 15, 2008 7:03 AM
 To: php-general@lists.php.net
 Subject: [PHP] Re: Passing variable to a page in a frameset
 
 Jody Cleveland wrote:
  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/sa
  lamander/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
 
 Frames?!
 
 As a fellow Wisconsinite and a web developer, I'm going to 
 have to ask you to leave the state.  Minnesota can have you.
 
 :P
 
 
 Jay
 
 
 PS -  No, but seriously, frames?!?!
 
 --
 PHP General Mailing List (http://www.php.net/) To 
 unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Jody Cleveland


On Aug 15, 2008, at 1:22 PM, Warren Vail wrote:


Actually you may want to check back with basic html at the target
parameter on your search form statement.

HTH,

Warren Vail
Vail Systems Technology
[EMAIL PROTECTED]


Target won't work for me because the originating page with the search  
box is not part of any frameset. I'm trying to get the search results  
from that page to go to a page that is part of a frameset.


- jody

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Stut

On 15 Aug 2008, at 19:39, Jody Cleveland wrote:

On Aug 15, 2008, at 1:22 PM, Warren Vail wrote:


Actually you may want to check back with basic html at the target
parameter on your search form statement.

HTH,

Warren Vail
Vail Systems Technology
[EMAIL PROTECTED]


Target won't work for me because the originating page with the  
search box is not part of any frameset. I'm trying to get the search  
results from that page to go to a page that is part of a frameset.


Are you saying that the frame you want to have the search results  
shown in doesn't exist when the search form is submitted? If it does  
then it doesn't matter where the form is, just specify the target as  
the name of the frame and it will almost certainly work.


If however you want the search to create the frameset when it runs  
then you have a completely different problem which is best solved  
using some sort of session. The script that handles the POST will need  
to store the details of the search somewhere and output the frameset.  
The frame that needs to contain the results would then grab the  
details and run the search outputting the results.


If I'm completely misunderstanding you please feel free to elaborate.

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Jody Cleveland


On Aug 15, 2008, at 1:46 PM, Stut wrote:


On 15 Aug 2008, at 19:39, Jody Cleveland wrote:

On Aug 15, 2008, at 1:22 PM, Warren Vail wrote:


Actually you may want to check back with basic html at the target
parameter on your search form statement.

HTH,

Warren Vail
Vail Systems Technology
[EMAIL PROTECTED]


Target won't work for me because the originating page with the  
search box is not part of any frameset. I'm trying to get the  
search results from that page to go to a page that is part of a  
frameset.


Are you saying that the frame you want to have the search results  
shown in doesn't exist when the search form is submitted? If it does  
then it doesn't matter where the form is, just specify the target as  
the name of the frame and it will almost certainly work.


If however you want the search to create the frameset when it runs  
then you have a completely different problem which is best solved  
using some sort of session. The script that handles the POST will  
need to store the details of the search somewhere and output the  
frameset. The frame that needs to contain the results would then  
grab the details and run the search outputting the results.


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


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Warren Vail
Probably something I don't understand about your implementation, but the
form parameter will allow a target parameter, and if the frameset contains a
frame that is named (even one different from the one that contains the
search form), the results should be placed in the target frame.  Without a
target, if the form is outside the frameset, it will replace the entire
frameset, exactly what you describe.

Warren 

 -Original Message-
 From: Jody Cleveland [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 15, 2008 11:40 AM
 To: php-general@lists.php.net
 Subject: Re: [PHP] Re: Passing variable to a page in a frameset
 
 
 On Aug 15, 2008, at 1:22 PM, Warren Vail wrote:
 
  Actually you may want to check back with basic html at the target
  parameter on your search form statement.
 
  HTH,
 
  Warren Vail
  Vail Systems Technology
  [EMAIL PROTECTED]
 
 Target won't work for me because the originating page with 
 the search box is not part of any frameset. I'm trying to get 
 the search results from that page to go to a page that is 
 part of a frameset.
 
 - jody
 
 --
 PHP General Mailing List (http://www.php.net/) To 
 unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Stut

On 15 Aug 2008, at 19:50, Jody Cleveland wrote:

On Aug 15, 2008, at 1:46 PM, Stut wrote:

On 15 Aug 2008, at 19:39, Jody Cleveland wrote:

On Aug 15, 2008, at 1:22 PM, Warren Vail wrote:


Actually you may want to check back with basic html at the target
parameter on your search form statement.

HTH,

Warren Vail
Vail Systems Technology
[EMAIL PROTECTED]


Target won't work for me because the originating page with the  
search box is not part of any frameset. I'm trying to get the  
search results from that page to go to a page that is part of a  
frameset.


Are you saying that the frame you want to have the search results  
shown in doesn't exist when the search form is submitted? If it  
does then it doesn't matter where the form is, just specify the  
target as the name of the frame and it will almost certainly work.


If however you want the search to create the frameset when it runs  
then you have a completely different problem which is best solved  
using some sort of session. The script that handles the POST will  
need to store the details of the search somewhere and output the  
frameset. The frame that needs to contain the results would then  
grab the details and run the search outputting the results.


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.


Ok, then I have to ask the question... why frames?

If you really need frames then you need to come up with a way to pass  
the search from the script the search form loads to the specific frame  
in the frameset it outputs. You could do this through a GET parameter,  
or via a session or in several other ways. In any case you'd be far  
better off not using frames if possible, so why frames?


-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Dan Shirah

 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='#00'
tr
td?php echo You searched for: .$searched_text; ?/td
/tr
/table
/form
/body
/html


Re: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Jody Cleveland


On Aug 15, 2008, at 2:05 PM, Stut wrote:


On 15 Aug 2008, at 19:50, Jody Cleveland wrote:

On Aug 15, 2008, at 1:46 PM, Stut wrote:

On 15 Aug 2008, at 19:39, Jody Cleveland wrote:

On Aug 15, 2008, at 1:22 PM, Warren Vail wrote:

Actually you may want to check back with basic html at the  
target

parameter on your search form statement.

HTH,

Warren Vail
Vail Systems Technology
[EMAIL PROTECTED]


Target won't work for me because the originating page with the  
search box is not part of any frameset. I'm trying to get the  
search results from that page to go to a page that is part of a  
frameset.


Are you saying that the frame you want to have the search results  
shown in doesn't exist when the search form is submitted? If it  
does then it doesn't matter where the form is, just specify the  
target as the name of the frame and it will almost certainly work.


If however you want the search to create the frameset when it runs  
then you have a completely different problem which is best solved  
using some sort of session. The script that handles the POST will  
need to store the details of the search somewhere and output the  
frameset. The frame that needs to contain the results would then  
grab the details and run the search outputting the results.


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.


Ok, then I have to ask the question... why frames?

If you really need frames then you need to come up with a way to  
pass the search from the script the search form loads to the  
specific frame in the frameset it outputs. You could do this through  
a GET parameter, or via a session or in several other ways. In any  
case you'd be far better off not using frames if possible, so why  
frames?


I work for a consortium of 30 libraries. Each library has their own  
website, but they all share the same web catalog. On each library's  
website there is a search box to search the catalog, which is on a  
completely different server from the websites. We've been finding that  
once people use that search box, they get distracted with the catalog  
and have no easy way to get back to the library's website. The problem  
I was tasked with is, coming up with a way to search the catalog with  
an easy way to return to where the user was before they initiated the  
search.


The only way I thought to do this was to use a frameset for the search  
results. Which, you can see here:

http://beta.menashalibrary.org/sites/beta.menashalibrary.org/themes/salamander/searchframe.html

If anyone has any ideas, other than using frames for the results, I'd  
love to hear them. The problem is, there's nothing I can do on the web  
catalog end.


- jody

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Stut

On 15 Aug 2008, at 20:21, Jody Cleveland wrote:

I work for a consortium of 30 libraries. Each library has their own  
website, but they all share the same web catalog. On each library's  
website there is a search box to search the catalog, which is on a  
completely different server from the websites. We've been finding  
that once people use that search box, they get distracted with the  
catalog and have no easy way to get back to the library's website.  
The problem I was tasked with is, coming up with a way to search the  
catalog with an easy way to return to where the user was before they  
initiated the search.


The only way I thought to do this was to use a frameset for the  
search results. Which, you can see here:

http://beta.menashalibrary.org/sites/beta.menashalibrary.org/themes/salamander/searchframe.html


Is POST the only way to get the search results, or will it work with a  
GET?


If GET will work then you need to set the search form to post to a  
script on your site which then outputs a frameset with a URL on your  
server that shows the header, and the URL for the shared search server  
with all the POSTed variables as GET parameters as the second frame.  
Job done.


If not then you're going to need to play silly wotsits with a hidden  
form in the top frame which reposts the search to the bottom form. Not  
pretty and would require JS but it should work.


-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Jody Cleveland


On Aug 15, 2008, at 2:27 PM, Stut wrote:


On 15 Aug 2008, at 20:21, Jody Cleveland wrote:

I work for a consortium of 30 libraries. Each library has their own  
website, but they all share the same web catalog. On each library's  
website there is a search box to search the catalog, which is on a  
completely different server from the websites. We've been finding  
that once people use that search box, they get distracted with the  
catalog and have no easy way to get back to the library's website.  
The problem I was tasked with is, coming up with a way to search  
the catalog with an easy way to return to where the user was before  
they initiated the search.


The only way I thought to do this was to use a frameset for the  
search results. Which, you can see here:

http://beta.menashalibrary.org/sites/beta.menashalibrary.org/themes/salamander/searchframe.html


Is POST the only way to get the search results, or will it work with  
a GET?


If GET will work then you need to set the search form to post to a  
script on your site which then outputs a frameset with a URL on your  
server that shows the header, and the URL for the shared search  
server with all the POSTed variables as GET parameters as the second  
frame. Job done.


GET should work too. Do you know of any examples anywhere online for  
this? My brain shuts off at the thought of how I'd do that.


- jody

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Dan Shirah

 I work for a consortium of 30 libraries. Each library has their own
 website, but they all share the same web catalog. On each library's website
 there is a search box to search the catalog, which is on a completely
 different server from the websites. We've been finding that once people use
 that search box, they get distracted with the catalog and have no easy way
 to get back to the library's website. The problem I was tasked with is,
 coming up with a way to search the catalog with an easy way to return to
 where the user was before they initiated the search.

 The only way I thought to do this was to use a frameset for the search
 results. Which, you can see here:

 http://beta.menashalibrary.org/sites/beta.menashalibrary.org/themes/salamander/searchframe.html

 If anyone has any ideas, other than using frames for the results, I'd love
 to hear them. The problem is, there's nothing I can do on the web catalog
 end.

 - jody



Easiest solution - Open the search page in a new window. Then they can just
close it to get back to the previous window...

I now understand what you're trying to say in regards to the frames.

The top frame resides completely on your server so you can place a Go back
to homepage link to direct people back to YOUR libraries homepage. And the
bottom frame contains the search results page that you have no control over
and cannot alter to simply place a Home link on it. And that should remain
since the global search results page is accessed by multiple libraries.

Like I said above, the easiest thing to do is just open it in a seperate
window so they can close it at any time and still be at the same place on
your libraries website.


Re: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Stut

On 15 Aug 2008, at 20:34, Jody Cleveland wrote:


On Aug 15, 2008, at 2:27 PM, Stut wrote:


On 15 Aug 2008, at 20:21, Jody Cleveland wrote:

I work for a consortium of 30 libraries. Each library has their  
own website, but they all share the same web catalog. On each  
library's website there is a search box to search the catalog,  
which is on a completely different server from the websites. We've  
been finding that once people use that search box, they get  
distracted with the catalog and have no easy way to get back to  
the library's website. The problem I was tasked with is, coming up  
with a way to search the catalog with an easy way to return to  
where the user was before they initiated the search.


The only way I thought to do this was to use a frameset for the  
search results. Which, you can see here:

http://beta.menashalibrary.org/sites/beta.menashalibrary.org/themes/salamander/searchframe.html


Is POST the only way to get the search results, or will it work  
with a GET?


If GET will work then you need to set the search form to post to a  
script on your site which then outputs a frameset with a URL on  
your server that shows the header, and the URL for the shared  
search server with all the POSTed variables as GET parameters as  
the second frame. Job done.


GET should work too. Do you know of any examples anywhere online for  
this? My brain shuts off at the thought of how I'd do that.


Off the top of my head and very untested...

?php
  $vars = array();
  foreach ($_POST as $k = $v)
  {
$vars[] = urlencode($k).'='.urlencode($v);
  }
  $searchurl = 'http://search.server.com/search.php?'.implode('',  
$vars);

?
frameset
  frame src=/header.html /
  frame src=?php echo $searchurl; ? /
/frameset

Modify to your own frameset/url requirements but that's the basic idea.

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Dan Shirah

 GET should work too. Do you know of any examples anywhere online for this?
 My brain shuts off at the thought of how I'd do that.

 - jody


When you GET a value you are retrieving a passed value that appears in the
address bar:
Example

http://www.mysite.com?name=joe

www.mysite.com is the website

?name=joe is the value being passed by GET

To put this value into a PHP variable you would simply do:
?php
$name = $_GET['name'];
? http://www.google.com/search?hl=enq=encrypt+javascript


Re: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Dan Shirah
On 8/15/08, Dan Shirah [EMAIL PROTECTED] wrote:

  GET should work too. Do you know of any examples anywhere online for
 this? My brain shuts off at the thought of how I'd do that.

 - jody


 When you GET a value you are retrieving a passed value that appears in the
 address bar:
 Example

 http://www.mysite.com?name=joe http://www.mysite.com/?name=joe

 www.mysite.com is the website

 ?name=joe is the value being passed by GET

 To put this value into a PHP variable you would simply do:
 ?php
 $name = $_GET['name'];
 ?


Although, since you have no control over the actual search page to edit the
code and have it pull in the $_GET[''] values you will probably have to
disect the search page to get its form elements so you can feed them to it
and force a submit.

I just looked at your site, and after I input my search criteria and click
submit I have to again enter in the search criteria and submit to actually
get some results.


Re: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Dan Shirah
There you go!

Entering in the search criteria pulls up the search in a new window and
automatically pulls results based on your search.  Then I can just close the
window to return to where I was on your site.

I think that is simple and easy to use.  And I'm sure not much of a headache
for you!


Re: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Jody Cleveland


On Aug 15, 2008, at 2:58 PM, Dan Shirah wrote:



There you go!

Entering in the search criteria pulls up the search in a new window  
and automatically pulls results based on your search.  Then I can  
just close the window to return to where I was on your site.


I think that is simple and easy to use.  And I'm sure not much of a  
headache for you!


It wasn't exactly what I had wanted, but it works and was very easy.

Thanks again for taking the time to help me.

- jody


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php