Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 10-19-2008, 11:19 PM return to sender
Skilled Talker

Posts: 60
Trades: 0
Is there html code, or maybe javascript code, that I can use in a "BACK" button that will return the visitor to the page the visitor entered from W/OUT me having to specify a specific URL?

Here is what I want to do in more detail:

I have a generic "form" that I want visitors to use to send me their contact information, etc.; however, there are a number of separate sections of the website that I want to link to the same "form" from.

The form only has a "BACK" button; no navigation menu. There are a number of different pages that visitors can reach the "form" from, but I want to send them all to the page they entered the "form" from after they have completed the "form". Is there generic code that I can use in the "BACK" button that will send them back to the specific page they entered from W/OUT me having to reveal to them the presence of the other sections of the site that link to the "form"?
052808 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-20-2008, 05:38 AM Re: return to sender
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
href="javascript:history.go(-1);"

but if they have submitted the form you may need (-2). And of course IF they have made errors in filling the form you may need even more. That will depend on whether you use client side or server side validation.

You can use server side code or javascript to capture the referring page when the form is first entered and pass that along with the form as a hidden field, then display it as the return link when the form is successfully completed. However the referrer field is NOT always populated.

Another way would be to store the URI in a cookie/session variable on the pages that lead to the form, then read that back when the form is completed.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-20-2008, 08:49 PM Re: return to sender
Skilled Talker

Posts: 60
Trades: 0
<a href="javascript: history.go(-1)">Back</a>

Thankyou. I wish I could make a javascript "Back" title to work with that piece of code so, if the site visitor has javascript disabled, the "Back" link will not even appear.

I am going to use your suggestion in, at least, one instance, but in a number of others I will, unfortunately, make identical pages with "hard coded" back links and so forth. Doing so seems, to me, very inefficient, but I need to get the pages up. Hopefully, I can master a more efficient and less redundant means of accomplishing this soon.

The primary issue is that I have numerous areas of this particular site that are only for a certain audience. I do not want to make it overtly evident to one "audience" how to get to the section set up for another "audience" and I really do not even want one "audience" to be aware of the other.

For instance, I might have a "presentation" for lawyers and a "presentation" for MDs and "another presentation" for health club owners that all use, basically, the same forms EXCEPT I do not want, say, lawyers to complete a form and end up in the "presentation", or site area, intended for health club owners. So I need "back links", etcetera, that will keep my different audiences in their own site sections despite the fact that they might use the same forms. note: One thing that might help is that each "audience" category, has a different username and password. I would not mind just having them type in their password to leave a generic page I send them to after they complete the form. It is probably easy to send them to a certain page based on the password they enter, but I do not know how to do that yet.

I have also gone through great pains to create a very simple site experience for those who use this site. I really feel that I must adhere to that because, I believe, it is VERY easy for a website to confuse web users, especially over fifty seasoned professionals, to the detriment of the website; so I am looking for a solution for this link issue that upholds this reasoning. In fact, it is mostly for this reason that I am using minimal javascript.

Probably the least confusing thing I can do for my web users is probably just make duplicate form pages that have "hard coded" URLs which send each "audience" where I want them to go; I just hate to waste so much time making, essentially, identical pages. And I am not yet knowledgeable enough to use "dynamic" content that may employ a database, etcetera.

Incidentally, ultimately I found a number of scripts that use a lot of code, apparently, just to create a single back link. The explanation given for all the code was usually that it avoids problems associated with using <a href="javascript: history.go(-1)">Back</a>. Here is an example of a script that uses A LOT OF CODE to create a single back link:

httc://www.htmlcodetutorial.com/linking/linking_famsupp_108.html
("The following pages shows you how to implement a simple, flexible back link script without many of the problems inherent in this type of scripting. We'll begin with the basic technique, then move on to ways to customize your back link.")
052808 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to return to sender
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.44363 seconds with 12 queries