Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mouseclick Imitating Backspace

Status
Not open for further replies.

jacksondorado

IS-IT--Management
Apr 12, 2001
135
US
Can a javascript be written to use a mouseclick to make a backspace keyboard action?

thanks. "There's no such thing as 'should have'."
 
I don't know how to make a mouse click simulate a backspace key press in any situation. But you probably want this for one certain application, and there is probably another way to do what you need.

What do you want the backspace for? Do you want it to navigate back in the browser history? Or to delete text in a textbox/area?

If its to navigate backwards, its possible through other means besides simulating a backspace key press. If its to delete text you run into a little bit of a problem because a mouse click is also used to position the cursor in text areas, focus elements etc. You could put an onClick event handler on the specific textbox/area and just manipulate the value attribute of the element to contain one less character.

If you have questions about how any of this is specifically done, you can post again.

cheyney
 
Thanks for the info.

What I want to do is navigate back in the browser history from a page written with CGI. What happens is:

From an HTML page a user fills out a form and submits, calling the CGI which sends the info to the user and writes a page stating success and also writes a button to the screen to get back to the previous page using history.go(-1), recovering the form data they had entered. This way they can re-submit the form with a different submit button that sends the info out to an entire list.

The reason for the first submit button is for the user to test-send it to themselves first. I'm getting an error when clicking the history.go(-1) button. Something that's calling the form error checking from.

I hope that all made sense... "There's no such thing as 'should have'."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top