close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

search results and first result details

Thread began 11/04/2012 6:47 am by paul386190 | Last modified 11/11/2012 11:38 am by paul386190 | 563 views | 4 replies |

paul386190

search results and first result details

Hi there, I wonder if anyone can assist?

I've set up a search function for a client, through the DataAssist search wizard, that allows visitors to select options from four dynamically populated dropdowns to display a filtered set of results. Currently I have the search and results (a list of thumbnails) on the same page and a DIV on the page as well with an ID of "main-inner-wrapper" that is populated via ajaxpage (Dynamic ajax content) when a thumbnail is clicked on with more content about that thumbnail. This can be viewed at product-search.php and the code is attached.

Everything is working fine, but the only issue is that when you perform a search and the results are displayed, there is no content in DIV "main-inner-wrapper". Ideally what I'd like is when the results are first displayed, the content about the first thumbnail in the results is displayed in "main-inner-wrapper". I've placed all the necessary php placeholders within the div, which all gets replaced when you click on any of the thumbnails in the results, but I can't seem to populate these php placeholders initially from the first thumbnail result.

Any advice would be greatly appreciated.
Many thanks in advance
Paul

Attached Files
product-search.zip
Sign in to reply to this post

Jason ByrnesWebAssist

call the ajax script in the body onload event:


php:
<body onload="javascript:ajaxpage('product.php?lazer_product_id=<?php echo $row_product['lazer_product_id']; ?>', 'main-inner-wrapper');">
Sign in to reply to this post

paul386190

Hi Jason

Many thanks for the response, really appreciate it. It appears to do the trick, but for some reason it seems to be intermittent. Sometimes if I perform a search it displays the details of the first result in the "main-inner-wrapper" DIV correctly. But on others, it doesn't and I have to press the search button several times before it does.
Do you have any thoughts as to what might me causing this?
Many thanks in advance

Kind regards
Paul

Sign in to reply to this post

Jason ByrnesWebAssist

I am not able to reproduce the issue

could be the browser cache.

Sign in to reply to this post

paul386190

Hi Jason
Sorry it's taken me a few days to get back to you, got tied up with other projects. Thank you for the advice, I've cleared the cache and it has worked to a degree. Unfortunately though it still seems a little intermittent so I'll see how things go for the mo as I'm still in initial build stage.
Many thanks for your assistance.
Kind regards
Paul

Sign in to reply to this post

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...