Simple Machines Community Forum

General Community => Scripting Help => Topic started by: Brian Lacy on December 05, 2003, 10:46:23 AM

Title: Long-standing, Simple Problem Needs Genius Solution
Post by: Brian Lacy on December 05, 2003, 10:46:23 AM
Okay, surely I'm not the only one this happens to.  Every so often, I'll be mucking around on the web typing a post just like this one (doesn't matter what site or software I'm using) and I'll go to hit the backspace key. Just then I realize that, oops, I clicked somewhere and the focus has left the textbox I'm typing in -- so the backspace key takes me BACK TO THE PREVIOUS PAGE -- and I lose EVERYTHING I just typed. I know there are ways to get around this, like increasing the size of your internet cache and so on, but I don't like doing that. In the case of an e-mail message, I could save a draft, but I don't always remember to do that any more than I remember to NOT hit the backspace key when the focus is off the box.

I am really sick of this problem. I'm sick of the fact that it exists at all. I've been dealing with it for longer than I care to think about.

So my question is, has anyone yet, or can someone, come up with a way to make sure that the user doesn't lose what he or she has typed, whether due to a page reload, stupid backspace-back-a-page, lost internet connection, or whatever?

I'm thinking maybe the input could be dynamically cached somewhere on the server, or something like that, so when the user reloads the page the stuff is still there. But whatever the solution, there's GOT to be something better than this!
Title: Re: Long-standing, Simple Problem Needs Genius Solution
Post by: Tony Reid on December 05, 2003, 10:50:02 AM
Pressing CTRL+Z sometimes gets it back if you havent pressed anything else
Title: Re: Long-standing, Simple Problem Needs Genius Solution
Post by: Brian Lacy on December 05, 2003, 11:24:09 AM
Heh, thats the first thing I instinctively try everytime. Never seems to work.

I think what I'm really looking for is a server-side or site-specific solution, so that other users on my site don't have to worry about it either. Doesn't have to be PHP.. could be JavaScript. Could be Java or even Flash for all I care, so long as it fixes the problem.
Title: Re: Long-standing, Simple Problem Needs Genius Solution
Post by: Anguz on December 05, 2003, 01:06:46 PM
javascript is client-side and to make it server side, you'd have to send the information as you type it...

maybe there's a hack to disable the backspace key to work as the previous-page key and just work as a normal backspace key

I remember that in Mac there was an extension that let you save in a cache everything you typed, so even if you unplugged the computer, you'd find what you were writting saved... I don't know if there's such a thing in Win

of course, the best solution, is to teach yourself to click in the textarea at the end of where you want to delete, before using the backspace key

maybe a javascript script could be written to do this, save what you're typing in a txt file as you type it... I don't know much about js, so it may be a silly idea...

you could also just write your stuff in notepad and when done, just copy-paste it in the form and submit
Title: Re: Long-standing, Simple Problem Needs Genius Solution
Post by: [Unknown] on December 05, 2003, 07:45:00 PM
You can capture the backspace (8) key and return false with javascript, yeah... in fact, you could put that in your user js for Mozilla Firebird ;).

-[Unknown]
Title: Re: Long-standing, Simple Problem Needs Genius Solution
Post by: writeto on December 05, 2003, 07:52:02 PM
Unknown your reply doesn't make sense to me. It is that stupid smiley... what are you trying to say?
Title: Re: Long-standing, Simple Problem Needs Genius Solution
Post by: pulpitfire on December 06, 2003, 08:32:04 AM
well, if nothing else, you could use a keylogger :).  I use "The Perfect Keylogger", which records only keystrokes, so it doesn't really slow my system down. 
Title: Re: Long-standing, Simple Problem Needs Genius Solution
Post by: Parham on December 06, 2003, 12:11:45 PM
When I finish typing whatever, I always copy it all... then go back and fix errors, then copy it again, then submit (just in case the server had crashed while I was typing)... freak eh?
Title: Re: Long-standing, Simple Problem Needs Genius Solution
Post by: Anguz on December 06, 2003, 12:57:14 PM
Quote from: Parham on December 06, 2003, 12:11:45 PM
When I finish typing whatever, I always copy it all... then go back and fix errors, then copy it again, then submit (just in case the server had crashed while I was typing)... freak eh?

I do exactly the same  :D
Title: Re: Long-standing, Simple Problem Needs Genius Solution
Post by: [Unknown] on December 07, 2003, 12:22:11 AM
Me too.

-[Unknown]
Title: Re: Long-standing, Simple Problem Needs Genius Solution
Post by: Cloudbringer on January 19, 2004, 10:29:45 AM
I do the copy thing most of the time, too. Our server was crashing alot for a while so we found it the best way to keep from tearing our hair out when we'd typed a long post!
Title: Re: Long-standing, Simple Problem Needs Genius Solution
Post by: Big P on January 19, 2004, 06:17:04 PM
Or enable caching of site, then if you went back by accident simply press ALT + -> (Right Arrow) and bobs your unclue. The page is still in memory. Works nicely for me.