Doug
|
Posted: 04/10/2004, 2:44 PM |
|
I have a Page with a 3 by 4 non-editable grid on our main page. The only visible columns are database driven Image file names. (call this Table 1) The actual controls in each column are image lnks.
I also have a different page with a Search control. After SUBMIT this retrieves the requested records (by selected category) and displays on a seperate grid page. (Table 2)
What I am trying to do is when the user clicks on one of the 12 pictures displaying in the home page grid (table 1), I want to pass the category (stored in another column in this table) to the search page (table 2) so it will automatically pull up a list of records matching that category. Is this possible ?
Thanks
Doug
|
|
|
srinivas
Posts: 54
|
Posted: 04/11/2004, 10:06 AM |
|
You can use the IMAGE LINK and have the "category" as one of the parameters that gets passed on.
-Srinivas
|
|
|
Doug
|
Posted: 04/11/2004, 10:10 AM |
|
Srinivas,
Thanks for your reply. The columns are IMAGE LINKS already. It is HOW to pass the category on to the next page that I am not understanding how to do. (It needs to initiate the actual SEARCH form that exists on the destination page)
thanks
Doug
|
|
|
srinivas
Posts: 54
|
Posted: 04/11/2004, 10:20 AM |
|
It is quite simple. In the Properties-Data sheet bring up the parameters for "Href Source". This may not be quite intuitive if you are new to CCS. Just select the source (such as mypage.ccp). Then you will see the ELLIPSIS (...) button to the right of thd property row. Click that button and it will bring up the HRef Source window where you can add the LINK Properties. Click on "+" button and add as one link-property at a time. That should do it.
-Srinivas
|
|
|
Doug
|
Posted: 04/11/2004, 10:55 AM |
|
Ok Thank you! I have done that. But on the DESITNATION page, which contains a grid that I want the search to automatically be peformed on, it is not including the Category field I am passing through the LINK PARAMETER to the SQL Clause. I placed this code on the destination page:
<cfoutput><br>SQL: #strSQL#</cfoutput>
<cfoutput><br>ORDER BY: #strOrder#</cfoutput>
<cfoutput><br>WHERE: #strWhere#</cfoutput>
It shows the complete SELECT statement, but the WHERE clause is blank. So the CATEGORY link parameter I am entering on the source page, is not passing this value correctly to the SQL Generator.
I will continue to research. Thank you again.
Doug
|
|
|
aradi
Posts: 66
|
Posted: 04/12/2004, 12:38 PM |
|
In page1(main page) add a before show row Event and add the following:
$page1_Grid_name->Image_link_name->SetLink("page2_name.php?Category_id=".$page1_Grid_name->Category_id->GetValue());
In page2(Search page) search form, i assume you have Category_id as a field name to search on
Try that and see (PHP code)
|
|
|