close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Detail page linked from DA Search Wizard-created Results page?

Thread began 7/21/2010 1:44 pm by jeffmg279672 | Last modified 7/22/2010 4:34 pm by jeffmg279672 | 1124 views | 10 replies |

jeffmg279672

Detail page linked from DA Search Wizard-created Results page?

Having created a search page and a results page I want to link from the name in the results listings to a detail page where more information from another db table would be displayed in a repeat region.

I've set up this details page with two recordsets (one for the name, the other for the additional detail) and presume that I need to either create a form variable or session variable using the name detail from the results page, but am not sure how to go about this. Would I filter my recordset for the additional detail by a form variable, session variable or something else?

Sign in to reply to this post

Dani Chankhour

You can add a query string to the url that is pointing to the detail page.

For example on your result page, the link on the name would be something like this:

<a href="product_detail.php?name=productname">productname</a>

So you will just need to update the link on the result page to add the "?name=productname" and then filter the record set on your detail page from the query string "name".


let me know if you have any other questions.

Sign in to reply to this post

jeffmg279672

Hi Dani - thanks, that helps. So I now have a link on my results page which is:
details.php?name=practicename

but I'm not sure whether I should then (on the details page) be using a URL parameter, form variable or...?

I've attached the page - it has two recordsets, one to pull in the practicename, one to pull in whatever reviews there are for that practice from the reviews table. Thanks in advance.

Attached Files
details.php.zip
Sign in to reply to this post

Dani Chankhour

You should use the URL Parameter and the Entered Value should be set to 'name' for the first record set.

Sign in to reply to this post

jeffmg279672

Thanks again - changed the recordset so that it now uses URL parameter with 'name' as the entered value; when I hit 'test' in the recordset window it works fine, but when I test it locally nothing appears, just a blank page....

Sign in to reply to this post

Dani Chankhour

did you update the link on your result page to include the url parameter. Please send me a copy of your results page to make sure you have set that correctly.

Sign in to reply to this post

jeffmg279672

Dani - results page attached.

Attached Files
results.php.zip
Sign in to reply to this post

Dani Chankhour

Thanks.

The link on your result page should be dynamic as follow:

<a href="details.php?name=<?php echo $row_rsPractice['practicename']; ?>"><?php echo $row_rsPractice['practicename']; ?></a>

please change line 151 to:

<td align="left" valign="top" class="smalltext"><div align="left"><strong><a href="details.php?name=<?php echo $row_rsPractice['practicename']; ?>"><?php echo $row_rsPractice['practicename']; ?></a></strong></div></td>

Sign in to reply to this post

jeffmg279672

Thanks Dani - did that and now I'm getting the practice name coming up on the page OK. However... when you go to the details page the practice name has now become a clickable link, which throws an error message as it's not linked to anything.
Also not sure why my reviews are not appearing on the details page - any ideas/anything obvious in the code that I've got wrong?
Page attached once again.

Attached Files
details.php.zip
Sign in to reply to this post

Dani Chankhour

I can't see why the name is clickable on your detail page, but in regard to the review not showing i think you need to use the practice id to filter the review. so line 44-46 should be:

if (isset($row_rsPracticeInfo['practicid'])) {
$colname_rsReviews = (get_magic_quotes_gpc()) ? $row_rsPracticeInfo['practicid'] : addslashes($row_rsPracticeInfo['practicid']);
}


You could see i used 'practicid', but if the column in the practicelist table is name differently, make sure to rename it to the correct column name.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...