Back to search engine from back button

liunx

Guest
I am a late starter to web site development - my first one in fact at the grand (grandmother!) age of 51 - to advertise my villas in Turkey for holiday lets. I used Dreamweaver and have subscribed to Google and Overture adwords but Overture are saying that my back button needs to take the viewer back to the search engine and all mine does is refresh the homepage. I do have an index page which just says to refresh my URL in one minute (once only). Someone has said that I need a piece of Java script in my homepage to say something like (history -2) so it doesn't get caught in a loop of going back one to my index page and then using the refresh to my URL getting caught in a loop. Can anyone tell me what I need to add - I don't know Java script.<!--content-->if yoursite uses document.write to place content on the page after loading,the back button wil lnot direct the user back to the search engine. Often, using frames will have the same effect. There are other effects of this, as I have told others i nthe past, but I do not recall some of the not as popular ways this occurs.<!--content-->If i understand you correctly. You need to use the JavaScript history.go() method.<br />
<br />
history.go(-2);<br />
<br />
Regards,<br />
Andrew Buntine.<!--content-->well one of us did not understand :) I think the original poster means that when clicking the back button, the page reloads, rather than going back, as a result of frames or other reeasons. Kind of like when using the search feature, when you click back after searching, it will take you back, but then will redirect you back where you came from :)<!--content-->I think Andrew may have ubderstood what I need - How do I write that history thing in Dreamweaver. Do I put it in meta tags? If so which ones? Where in the heading do I put it? Sorry being so dense but I have only started with HTML in Dreamweaver and dont do much hand coding although I am getting better............<!--content-->well, what Andrew has given you is a way to send users to the last page in history (-1). It appears that when you click the back button, the history looks like:<br />
<br />
Your Site (You are here!)<br />
Your Site<br />
Seatch Engine<br />
<br />
When you go back, you go back to your site, and then in several seconds are redirected forward to the You are Here location. The ways to get out of this would be to make the back button go ack two pages, but you don't have this control. You might want to check document.referrer, and if the referrer and document.location.href are the same, redirect them back accordingly. then again, maybe Andrew understands and I don't.<br />
<br />
EDIT: Andrews post would be perfect for a link to go back to the search engine, not sure how it will perform with the back button, however, after looking over what he has written, realized I may have misinterpretted the code, and it might actually be what you need.<!--content--><body ... onunload="history.go(-1)"><br />
<!-- Content --><br />
</body>Something like this will cause the page to go back 2 pages when the back button is pressed (back is -1, -1 + -1 = -2, two pages back). <br />
<br />
When loadfing a different page, it doesn't have a problem, if you type in the address bar, the address. Also, clicking links should settle fine. However, when clicking forward, the script will prevent the page from browsing to thr next page,<!--content-->
 
Back
Top