aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes A problem in hiding a button 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 "A problem in hiding a button" Watch "A problem in hiding a button" New topic
Author

A problem in hiding a button

Tanu Tanvi
Greenhorn

Joined: May 05, 2009
Posts: 3
Hi,

I am using 2 buttons in a jsp page where, I am making one of this button to hide and depending upon the output another should be visible..
I am using AJAX to communicate to the servlet and div's style attribute "style.display='none' for hiding the button and 'block' to unhide it...
the problem is, the button is visible for only a sec...It jus flashes for a sec and again going invisible...what may be the problem???

posting my code here,

________________________


Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61654
    
  67

Two things:

Please be sure to take the time to compose descriptive subjects for your posts; read this for more information. A title such as just "AJAX" is not helpful. What would happen if all posts had such a title? Please go back and change your post to add a more meaningful subject by clicking the button on your post.

Also, Please be sure to use code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information. You can go back and change your post to add code tags by clicking the button on your post.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You are submitting the form, you need to cancel the button click or use a normal button.

Eric
Tanu Tanvi
Greenhorn

Joined: May 05, 2009
Posts: 3
Eric,

Yes, you are correct...I didnt notice that ...its working fine...

Thank you
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A problem in hiding a button