/    Sign up×
Community /Pin to ProfileBookmark

Dynamically adding row in a vector.

Hi ,

I have a urgent need for some solution for this problem.

Problem 1 :
———

I am calling a row data from a vector and compares with another value if the vector row value is higher i need to break it in two rows one equal to compared value and other is remaining value .

This need to be added back to the vector so that the next available value for comparing reads it and compares again and the process continoues.

I am neither getting error or exception and nor the output. Please suggest where and what went wrong. or any alternate way to acheive it.

Problem 2
———

I need to add a Back button onmy serlet which get back to previous page from where it was invoked. I tried a Javascript embeded n servlet html output page but it didnot work. Basically i need same functionality as Back button in browser.

Thaks in advance for your great help.

to post a comment
Java

2 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliApr 22.2005 — Problem1: You will need to re phrase your questio(at least I had hard time understanding what you want)

Problem2:

2 options:

one is that you can use referer value in the servlet and then store it when next time this servlet is called with a particular prameter pointing that user want to go to previous page then just use that referer value.

Second option will be to use JavaScript history object, like when abutton is clicked

<input type="button" onclick="history.go(-1)" value="back"/>
Copy linkTweet thisAlerts:
@princeauthorApr 23.2005 — Thanks Khalid for your response . Java is a wonderfull language the more you apply it the better results you get. I am thankfull for you intrest in my problem and also apologize if my first question was not very clear. Now since i could sort it and its working . I wil move on to next question.

Problem2
----------


Again your suggestion is welcome. I did the same Script to work for Back Button. But some how the script is not working. Let me make it more easier to understand for you this time.

I am displaying a page generated from a SERVLET it has 3 buttons on it displayed below a table. The button are Submit, BacK and GoTo.

Button1 is SUBMIT it direct the form to another servlet and works fine.

Button2 is BACK for which i wrote java Script as suggesetd by you on Click it does nothing????? That means Script is not getting active????

similarly on Button3 i want to call another html page with some message this is also not working. Hope am clear this time...

Thanks a zillion.
×

Success!

Help @prince spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...