File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark ""Edit in Place" Using Simple JS" Watch ""Edit in Place" Using Simple JS" New topic
Author

"Edit in Place" Using Simple JS

Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

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
author
Rancher

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



Eric
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Hey thanks, It helps
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: "Edit in Place" Using Simple JS