I am stuck with a problem for which someone may know a solution.
The issue is as follows:
1. a webpage with everything organized in a table instead of using frames.
2. A search engine, for which the input form is located in the left column.
3. Results are supposed to be shown in the 2nd column.
What I tried is to replace the php action in the form with the URL of the page in which the results are to be shown, with then in the middle column an include() of the original action of the form.
All parameters for the form are set in the form. These variables are passed on to the html page (action), but as I notie, the parameters are not given ahead to the page inside the include().
Is anyone aware of how this problem could be solved? How can parameters be given ahead to the external action "search"? Important to know is that I have no control over the search function, can not change it.
How to pass variables
Moderator: General Moderators
Use a mixture of DHTML and PHP:
Create an "invisible frame" (i.e. no height, no width, just content) or iframe (browserspecific) and a <span id="cell2">...</span> (or "div") around the content of the table cell you'd like to update.
The source file for the invisible frame will be calling the search-function. When a search is conducted, pass that frame the search-query (via GET or POST) and, onload, update the cell in the parent document with javascript:
It won't work in older browsers.
Create an "invisible frame" (i.e. no height, no width, just content) or iframe (browserspecific) and a <span id="cell2">...</span> (or "div") around the content of the table cell you'd like to update.
The source file for the invisible frame will be calling the search-function. When a search is conducted, pass that frame the search-query (via GET or POST) and, onload, update the cell in the parent document with javascript:
Code: Select all
parent.document.getElementById("cell2").innerHTML=resultsOfMySearchQuery.Invisible frames
Thank you for the answer, but complaints against the use of frames is just the reason for going to tables. Apparently there is a lot of people who refuse to enable frames, so the only way to accomodate everyone is by using tables.
The include() function does a wonderful job for inserting dynamic data in the cells of a table, but the problem here is the passing of variables.
The include() function does a wonderful job for inserting dynamic data in the cells of a table, but the problem here is the passing of variables.