Forums

This topic is locked

Results list disappearing on refresh

Posted 16 Apr 2004 15:47:56
1
has voted
16 Apr 2004 15:47:56 Jon McGee posted:
(further to my previous post (the solution given worked! Thanks)):

I have a page which displays 10 results at a time from a search and the
detail for one of those records.

If you want to see record 4 you click on record 4 and the page reloads and displays the detail for record 4. However when you do this all the results dissapear and it says displaying result 0 of 0. Im using two record sets, one for the
search and one for the detail.

Any ideas what Im doing wrong?

www.bioscience.co.uk/New/searchlist3.asp

and do a search for 'mouse'

Thanks
Jon



Edited by - jonny mags on 16 Apr 2004 18:17:54

Replies

Replied 16 Apr 2004 16:10:25
16 Apr 2004 16:10:25 Dave Thomas replied:
just my opinion here, but i'd get rid of the ad on the right, and have my record detail open in an Iframe or Layer where that ad is placed.

at the end of the day its a search page, and search takes priority, scrap all other elements as they are most probably on all your other pages anyway.

i brought back over 4000 results for Mouse, and wouldnt fancy trawling through all them pages to find what i was looking for.

just out of curiosity, how are you adding records in your database? because looking at the records detail you get a catalogue number, when an incrementing ProductID would work better.

Regards,
Dave

[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
If you like online gaming, please register @ www.nova-multigaming.com
Replied 16 Apr 2004 16:23:26
16 Apr 2004 16:23:26 Jon McGee replied:
Hi. The detail area is already a layer and shows 'over' the ad once a search is made. Unfortuanetly the ad has to remain as this will change and will later reflect what the search results are. Regarding filtering of results, yes, 4000 is a lot but DB work is being done behind to make that more approachable. At the moment Im just interested in getting the results list to maintain as opposed to the 'design' of the site. Im scratching my head a bit. But if you know of a solution to keep results and a detail layer on the same page it would be great. Thanks.
Replied 16 Apr 2004 18:49:42
16 Apr 2004 18:49:42 Vince Baker replied:
I think your problem is that your initial search recordset is being filtered on a form value rather than a querystring value so when you click on the detail value you are loosing your value transfered by the form method.

Change this so that the inital search and the detail search details are in the url querystring.

I normally do this so that people can bookmark the search results. If the search value is not in the url this cannot be done.



Regards
Vince

Visit my home: www.chez-vince.com

VBScript | ASP | HTML | SQL | Oracle | Hosting
Replied 16 Apr 2004 18:50:59
16 Apr 2004 18:50:59 Vince Baker replied:
oh, and by the way, nice looking site.

Regards
Vince

Visit my home: www.chez-vince.com

VBScript | ASP | HTML | SQL | Oracle | Hosting
Replied 19 Apr 2004 13:27:56
19 Apr 2004 13:27:56 Jon McGee replied:
Thanks for the advice - works a treat - the results maintain! Of course this throws up another problem as luck would have it.

Now when you click on a result it shows the detail layer fine. Click on another and the detail layer dissappears. Now ive got a behaviour that hides the layer if the recordset is empty but... also the query string, the more u use it is whacking all sorts of superflous stuff in the url - like image refs etc, it doesnt 'clear'.

Hmmm head scratcher. The revised url is www.bioscience.co.uk/New/searchget.asp

(PS, glad u liked the design, thanks)

Replied 19 Apr 2004 14:13:43
19 Apr 2004 14:13:43 Dave Thomas replied:
thats the difference between a form variable and a querystring.

a form can post loads of stuff to muliple pages without seeing anything in the url.

whereas the querystring will show EVERYTHING in the url that is being transferred to the next page.

i tend to stay away from querystrings unless it is for small amounts of data, but to be honest, rather than give yourself all these headaches just change your design for how you show your search results.



Regards,
Dave

[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
If you like online gaming, please register @ www.nova-multigaming.com
Replied 19 Apr 2004 14:21:14
19 Apr 2004 14:21:14 Jon McGee replied:
But I can't change the design like I said because each design has been approved and would be more of a headache than working out the correct coding to go back with changes to the design. Im just trying to simply show the details and results on the same page. If you've any ideas how to do this Id be greatful.

Replied 19 Apr 2004 16:17:49
19 Apr 2004 16:17:49 Vince Baker replied:
I am not that familiar with using layers so here is how I would do it (if you have the layer approved this might not be of any help)

I would show the details for the item in a pop up window rather than a layer.

When the user clicks on detail, send info to pop up and then the user can close the window when done viewing. Then, clicking on next item will again open pop up.

This is a very controlable method. Sorry cant help with your layers.

Another way would be to show the detail under the item title line when title clicked on. Formatting should make that look very presentable.

Regards
Vince

Visit my home: www.chez-vince.com

VBScript | ASP | HTML | SQL | Oracle | Hosting
Replied 19 Apr 2004 17:01:27
19 Apr 2004 17:01:27 Dave Thomas replied:
Ditto.

I'd also go for the po-up route.

you can control the size, positioning of it easily enough

layers are unpredictable in some browsers, so i only use them when absolutely necessary in the design..

and btw jon, im not knocking your site m8, its looks good, just having a little layer to show info may not be the best route forward for you.

Regards,
Dave

[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
If you like online gaming, please register @ www.nova-multigaming.com
Replied 19 Apr 2004 17:04:11
19 Apr 2004 17:04:11 Jon McGee replied:
Hi, thanks for replying. Nope, again, the detail has to be on the same page in that particular location. If I could have the detail in a popup or seperate page there would be no problem as this is how the previous version of the site was. But the new site HAS to have the detail on the results page. It doesnt have to be in a layer necessarily, but it does have to be on the same page. No getting around that fact unfortunately.

So simple yet so complicated!

Im wondering if session variables could be used?

regards
Jon
PS Dave et al, I know no one is knocking the site, but cheers for the reassurance. No the problem is my hands are tied on this and I cant do the pop up route or seperate page other wise It'd be done in a jiffy.


Edited by - jonny mags on 19 Apr 2004 17:07:45

Edited by - jonny mags on 19 Apr 2004 18:18:05
Replied 20 Apr 2004 18:34:07
20 Apr 2004 18:34:07 Jon McGee replied:
Problem Solved - The solution was pretty obvious after all! (Thanks to Chapter 27 of Dreamweaver MX 2004 by West and Muck ISBN-0-07-222943-8 which out of deperation I bought this lunchtime - highly recomended).

All I had to do was put a layer in the repeating region and a 'on mouse over' (or click or whatever) show the layer containing the detail). And because it's a layer it can be 'outside' the repeating region as long as it's anchored in it.

Its scruffy at the moment but the coding works.

www.bioscience.co.uk/New/search_layers.asp

Been painful this one but thanks for all the help. Regards, Jon.

Replied 20 Apr 2004 21:54:30
20 Apr 2004 21:54:30 Dave Thomas replied:
nice one.
glad u got it working.

do a tutorial on it when youve polished it up, to help others in the future.

Regards,
Dave

[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
If you like online gaming, please register @ www.nova-multigaming.com
Replied 23 Apr 2004 14:02:16
23 Apr 2004 14:02:16 Jon McGee replied:
Yeah, no problem - I will when Ive finished the website and everything is 100% fine. (am now having problems with UltraCart!)

Reply to this topic