Web Hosting, Design, & Coding forum

General discussion

Disable "Back" button

Or maybe not disable completly but insted make it so when they click the button it goes to a certain page. Anyone know how (for HTML)?

Discussion is locked
You are posting a reply to: Disable "Back" button
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: Disable "Back" button
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
Fortunately...

In reply to: Disable "Back" button

With other browsers this will not always work. There are notes "how to" with IE, but you can't fix this on all the other browsers.

Bob

Collapse -
I would not appreciate that at all

In reply to: Disable "Back" button

if some webdesigner tried to mess with my computer's functions. And while disabling the back button is borderline, having the back button go to somewhere else and not just "back" is just wrong. (if that should be doable).

Collapse -
Well its not what you think

In reply to: I would not appreciate that at all

I am making a game type thing but do not have enough knowledge to use javascript yet. It's kinda like you click links to do stuff, but if you could just click on back you could cheat and click something else insted.

Collapse -
Why don't you

In reply to: Well its not what you think

Why don't you just open the link in a new window, that way you cannot click on the back button

Collapse -
hmmmm

In reply to: Why don't you

Oh yeah, but how do you do it? I know that just "_blank" doesn't work, so how'd you make the pop-up box?

Collapse -
<a target="_new" href="wherever.html">new window</a>

In reply to: hmmmm

and I think target="_blank" works, too....

Collapse -
Forcing a link to open in a new window ...

In reply to: <a target="_new" href="wherever.html">new window</a>

is discouraged by the w3c. And even possibly illegal, they say: http://lists.w3.org/Archives/Public/www-validator/2002Apr/0100.html

If you still want to do it (and there might be good reasons to do so), "_blank" is the thing to use. "_new" might work, but (possibly depending on the browser) just as well only the first time (because it isn't a standardized name, it's considered a real framename, so it will be reused a second time. If you want that, simply use target="mysecondwindow" or any name you like.

Kees

Collapse -
In fact, come to think of it, ...

In reply to: <a target="_new" href="wherever.html">new window</a>

Popular Forums

icon
Computer Newbies 10,686 discussions
icon
Computer Help 54,365 discussions
icon
Laptops 21,181 discussions
icon
Networking & Wireless 16,313 discussions
icon
Phones 17,137 discussions
icon
Security 31,287 discussions
icon
TVs & Home Theaters 22,101 discussions
icon
Windows 7 8,164 discussions
icon
Windows 10 2,657 discussions

DEALS, DEALS, DEALS!

Best Black Friday Deals

CNET editors are busy culling the list and highlighting what we think are the best deals out there this holiday season.