Viewing Problem

I have designed a website for a real estate company and am having a problem with two things:

  1. When scrolling down the page a visitor clicks to see the next picture, the whole page reloads and starts at the top so the visitor has to scroll back down the page to see the next picture. Over and over. I have read a lot of books and seen a lot of videos but none of them tell why this happens or how to fix it. Can anyone help me with this or point me in the right direction?

  2. I am using a database to store my real estate listings and there are multiple pages. If a visitor clicks on View Details then clicks back to go back to the listings, they have to start at the top of page one. What do I need to do so that a visitor can click back and return to the exact spot they were before they clicked View Details?

These would seem to be simple questions but like I said before, I have gone thru a log of material and have not found the answer to these questions. I sure hope you can help. Thanks!

If what you think is more important than what your visitors think then you don’t belong in web design. The studies have been done, the results are known, and the vast majority of users don’t see it your way.

Well, if you purposely want to drive users away from your site that is your right, but it’s a strange business model if you are looking to make money from these very same visitors.

“My sites get 10%” fewer users than my competitor’s" doesn’t sound like a good selling point.

I am just learning web design and that was my first website using CSS and ASP.NET. It leaves a bit to be desired but I have been learning all I can on CSS, ASP.NET, Jquerry, SQL, etc… there is so much to learn. As stated redoing this site and am trying to do a professional job of it. Thank you for your help!:slight_smile:

<a href=“javascript…”> is never a good idea. For a start, it completely fails for anyone who doesn’t have Javascript running, for whatever reason. For a second, it is rarely the best way to achieve the aim.

It is friendly to let visitors use the back button to go back a page. Everyone knows how to go back using the back button, and it is predictable behaviour. Replicating browser functionality on-page is unhelpful, because it can confuse people, it hinders them learning the browser functionality and it doesn’t give consistent behaviour.

It is also friendly to give them a link to the previous page in the structure or the next page up in the hierarchy. But that has to be done with a link to a specific page, not a link to the page they were looking at last. For all you know, they followed a link from a search engine or another site to land at that page. Your ‘back’ link hasn’t taken them to the relevant page on your site, it’s taken them out of your site and back to what they were looking at before.

Rhetorical question: Is that helpful?
Rhetorical answer: No.

For the first problem I would suggest you use in combination with Ajax.


For the second problem! Did you try javascript:history.back(1)

Like I said our ideas about that are different, no offense or what soever. I personally don’t like a site where I need the browser back button to go to the previous page or 2 or 3 page back. I work and worked on several websites where the visitors would be annoyed if they didn’t have the opportunity to go back from where they where coming from. I don’t talk about just one step but sometimes 2, 3 or even 4 steps. I use my server side scripting in combo with javascript for these cases and to be honest I never got any complaints. And for what you said about coming to a certain page after serving the net. You simply only show this back link if the referral is from the same site.

And let’s face it. If 5% of all Internet users have javascript disabled, it’s a lot, so again I don’t see any problem in using Javascript for this kind of functionality.

Are you using PHP? If so you probably need to use another way to display your gallery, most likely a combination with jQuery where the page will not be reloaded. I know that Coldfusion have certain options to refresh data without reloading the page but I’m not sure about PHP.

For the back button on your detail page. You need to set certain variables so that you can send the visitor back to the last page the were before entering the detail page. The most likely ones are your paging variables

You have site navigation so people can find their way around your site. You don’t need to tell them where they have come from - they can sort that out themselves. You need to tell them where they can go to.

How about this. You’re searching on Google for a house to buy in a particular area, and it comes up with a link to a property on a realtor/estate agent’s website. Now maybe the property has sold and you get a different page, maybe it’s not what you’re looking for, maybe it’s fine but you want to see some more choices. What you need that website to give you is an easy way to go ‘back’ to the list from which that property was chosen. But in your case, it isn’t ‘back’, because you haven’t been there before. It’s more like ‘up’. Whichever direction you want to call it, it’s much more helpful to link to a relevant place on your site than to send people back to where they came from, given that 99.99999% of people browsing the web are capable of doing that themselves using basic standard browser functionality.

I have, on various occasions, landed at a content page on a website, and wanted to explore further. If any link I try takes me to the previous page in my history, back off the website - stuff 'em. I won’t look at the site again. Simple.

In terms of ddtgard’s query - clicking the back button should take you back to the same page state that you were looking at before you clicked away from it. If it doesn’t, then (1) it probably means you’ve got a load of scripts manipulating the page onLoad, and (2) using that piece of Javascript will have exactly the same effect as clicking the back button, so you aren’t gaining anything.

As far as I can see, do you not have a back button, other than the browser back button, which by the way in Opera, FF and IE8 and 9, is going back to the previous page. But it is not very user friendly to let visitors use the browser back button. Better place a text link or button with the javascript as mentioned before. I.o.w.

<a href="javascript:history.back(1)">Back to listing</a>

It could be one of several things - if you want to post a link to what you’ve got, we can have a look and see what would be a better solution.

Off Topic:

A few posts have been removed from this thread, as they were getting a little too critical and personal. Please keep the discussion to the issue and not to the person. :slight_smile:

I never said it was the best solution. In an earlier mail I told him, depending on the scripting, that he could use variables

But beside of that, I don’t think it can do any harm to use one simple line of Javascript. Since the introduction of jQuery in 2006 there are millions of sites using the different plugins and you know as well not the smallest sites around are along them.

This was an answer to a question ddtgard had!

so I supplied an option

About the browser back button! Obvious our ideas are different in this! Why have a navigation in the first place? :slight_smile:

I am using ASP.NET for this website, I built it in 2008. It has many problems which I am currently redoing. the link is

Thanks for the help!

I have never used Ajax but will check into that, I did get a book on it so I guess it’s time to read it.

I don’t know a lot about Javascript either but I did sign up for the sitepoint webinar, just haven’t had time to go thru it. Now’s the the time.

Thanks for your help.