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 how to delete multiple browse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to delete multiple browse" Watch "how to delete multiple browse" New topic
Author

how to delete multiple browse

hello all
Greenhorn

Joined: Sep 16, 2010
Posts: 1
hi,
i had seen some application in net by using that i had done how to delete multiple browsers..but im not getting deleted..i had done the following code..im not getting deleted.can anyone help me out.

any one help me why im not getting
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
help regarding my post
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 512

madhuri kunchala wrote:help regarding my post


can't understand this.. which is your post.?.


Regards, Prasad
SCJP 5 (93%)
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
sorry wrongly i messaged for others post.. regarding multiple delete browsers that hello all asked..i m instresting regarding that topic..so i m waiting for the answer
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
hi,
i had tried what hello all had posted..i changed the code..if i click delete button everything is getting deleted i.e., the table...only add and delete button are present..can any one check it.here is the code
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 512

What are you expecting to get deleted..? You are passing the table id to a function and in the function getting its element, and deleting those, obviously it deletes all the elements in the table..
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

@"hello all": Please see the JavaRanch naming policy and change your display name to conform with this policy. Thanks!
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
hi Prasad,
according to hello all need i dont know what they want..i think one by one should be get deleted by clicking delete button..can you provide how to do.
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 512



use the above code, so that, every time on click of the button, the first element and only one element is deleted...

madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
hi Prasad,
it is working but the added ones should get deleted i think the main table value is deleting and next the added ones are deleting..how can i do that
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 512

In this part of the code replace '0' with the number of main table row elements you have..
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
hi Prasad,
i had changed the code like this.

it is not deleting all the rows if i click delete button..but the starting browse button should be there i.e default one..by using the above code if i delete the added browse button is remaining without the label..how can we do it.
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
hi Prasad,
i had tried that one previously what you suggested..when jsp is runned the default one should be there only the added browse buttons should be deleted.i checked by keeping numbers.
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 512

can you show me your full html/jsp file?
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350

this is what i coded.i added the add function
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 512

This will delete all the added row at once except the first two element, which i think is not your requirement.. Change the deleteRow function to the following...

madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
hi Good Morning Prasad,
i had done the changes what you had suggested..if i click delete every time it is deleted one by one...but i need the default i.e., when you run the page the 1st browse button 'File: Browse' it should not get deleted...here is the code


can you check it..the same thing i need to implement in my application.
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 512

Hi Madhu,
Good Morning..

I checked the code, it is not deleting the first browse button, it is working correctly, can you please explain what is the problem, you are facing?
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
hi,
thanks for your reply..if i run the page im getting default browse button..if i click 'Add Row' it is adding how many times i click..for suppose if i click 2 times the 'Add Row' button it is getting added..i want to delete the added rows..if i click 'Delete Row' it is deleted the default row and if i click another time it is deleting other row..but i need the default row..if i click default row it should throw an alert..can you provide me the solution.
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 512

The first one is your default row right? The rows are getting added below the first one, right? If you click delete, the rows are getting deleted from bottom right?
BTB, how do you make out, which your default row?
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
hi,
the first one is the default row..the rows are getting added below the first one..if i click delete, the rows are getting deleted from top i.e., the first one which is the default..but the default should be there..the added one should get deleted after the default i.e., first row
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 512

Yes, the rows are getting deleted from the top, that is, it deleting the rows from the second row, the one remaining is your default one, you can check it by giving a text box instead of a file option.. you will be left with the text box, after you delete all your added browse buttons..
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
but in my application i had only file browse buttons..how to make the default one not to get deleted.
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 512

The default browse button is not getting deleted.. the one remaining is your default browse button..
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
hi Prasad,
i got what i want..i had done some changes...its working fine..here is the code.

thanks for your support..can you suggest me the if i click add row..the row get added at the left side of the table ..but i need to get it below the first row..
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 512

Left side of the table, also it will be below the first one right? If, not check with tr and td declarations..
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
here im sending the screen shot..can you check it...im unable to attach the screen shot.
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 512

You can save it as an image and attach that image here..
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
hi,
i got the added browse buttons in correct format but it is getting added after add,delete,upload..here is the screen shot..can you check my code where it went wrong


[Download t.bmp] Download

Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 512

Keep Add, Delete and Update button in a separate table..
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
hi Prasad,
i had done the following..here is the code...and the screen shot is as follows


[Download untitled.bmp] Download

Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 512

put the upload part also in the same td as Add and Delete.. BTB, where do you want Add, Delete and Upload buttons to be.. one after the other or besides?
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
i want Add, Delete buttons after Browse button that to on the same line..in the next line only upload button..
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 512

Then, for every browse you are creating, you need to create a Add and Delete button as well..
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
hi Prasad,
no..for every browse it should not create each time the add and delete button..only one add and delete button should be there.do you got my requirement.
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 512

No.. where you want your Add and Delete button to be, besides which browse?
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
beside default browse
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 512

Add, 'ADD' and 'DELETE' buttons in the td of your default browse button..
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
i tried that one but im not getting..it is getting at the down not at the side of default browser
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

@madhuri: I find it unlikely that you and "hello all" are different people. We discourage sock puppets here. I'm locking this thread until either 1) I'm convinced I'm wrong, pr 2) I'm told that this okay according to JavaRanch policies.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to delete multiple browse