The moose likes HTML, CSS and JavaScript and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark ""Edit in Place" Using Simple JS" Watch ""Edit in Place" Using Simple JS" New topic

"Edit in Place" Using Simple JS

Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902

Hi Ranchers,

I'm making a simple "Edit In Place" for my web app, Here is the current scenario

Edit it

When I click "EDIT" button, JS replace "name", "surname" fields to <input type="text"> and button EDIT replaced by button "UPDATE"
and this UPDATE button call AJAX.

If user clicks the "EDIT", button, the input fields are shown, Now I want to make this input fields hidden again if the user clicks anywhere else on body screen, How can implement this ?

I tried to use
But the problem is, it consider any click, including the click on "EDIT and "UPDATE" button, which I don't want !!
Any inputs??

[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
Basic idea:

Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902

Hey thanks, It helps
I agree. Here's the link: http://aspose.com/file-tools
subject: "Edit in Place" Using Simple JS
Similar Threads
problem when integrating jspell with tinyMCE editor
Is it possible to put a button inside autocomplete in jquery ui plugin?
JQuery: Accessing DOM elements in the same div as the clicked button
JSP not calling JS file funtion
Edit nested input element value attribute