aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Trying out jquery, but things are not working out Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Trying out jquery, but things are not working out" Watch "Trying out jquery, but things are not working out" New topic
Author

Trying out jquery, but things are not working out

Rahul Shivsharan
Ranch Hand

Joined: Jun 17, 2009
Posts: 83
the code below has 2 buttons 'CLICK-ME' and 'AGAIN-AGAIN'

on the click of first button all the empty td's get filled with text .

now what i'm trying to do is on click of second button just remove the text in
td's and add a new text . But the second functionality is not happening .

can anybody please help me out or just give a hint

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I think you want to read what empty is: http://docs.jquery.com/Manipulation/empty

Does that sound like what you want?

Why are you using that filter?

Eric
Rahul Shivsharan
Ranch Hand

Joined: Jun 17, 2009
Posts: 83
i'm using filter to filter out those td's whose child node type is text ,
or else it will fill the new text in those td's which has child node input


and i added empty(), because first it will empty the text in between td's and than add new text.

This is what i was trieng to do
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60048
    
  65

Rahul Shivsharan wrote:i'm using filter to filter out those td's whose child node type is text ,
or else it will fill the new text in those td's which has child node input

Huh? There's nothing there. This is completely unnecessary and pointless. And you don't need to empty the element first -- the existing content will be automatically replaced.

The best way to make sure that something doesn't work is to over-think it. Just keep it as simple as possible.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Bear Bibeault wrote:This is completely unnecessary and pointless.

And gratuitous and extraneous!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Trying out jquery, but things are not working out
 
Similar Threads
How to update a image using servlet?
exception while running code
Javascript: onclick changing styles
jquery script not executing on the data values that are extracted from the database
Question on jQuery ajax functionality & troubleshooting called bean in JSF page