473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

need some help to write a javascript function

adi
Hello guys.

This is Aditya. I have a jsp where i am displaying more than 10,000
records and finally i am adding the values of these records in the end
and displaying the total value as Total: .
My Task:
Now i want to write a javafunction which can shrink these 10,000
records into a word say (Add). When the user comes and selects or
clicks this Add then he can view all the 10,000 records and if he
doesnot click Add, then only the total should be displayed.

I have already wriiten the logic to display the total only. Now i am
struck with the javascript part .

It would be really great if anybody help me out with this problem.
Waiting for your replies.

Thanks in Advance.
Aditya Reddy
Jun 30 '08 #1
2 1081
adi wrote:
[...] I have a jsp where i am displaying more than 10,000
records and finally i am adding the values of these records in the
end and displaying the total value as Total: .
My Task:
Now i want to write a javafunction which can shrink these 10,000
records into a word say (Add). When the user comes and selects or
clicks this Add then he can view all the 10,000 records and if he
doesnot click Add, then only the total should be displayed.

I have already wriiten the logic to display the total only. Now i am
struck with the javascript part .
JSP are JavaServer Pages, not JavaScript Pages. Java, unless related to
LiveConnect/XPConnect, is off-topic here and on-topic in comp.lang.java.ALL
instead.

You really don't need J(ava)Script here. What exactly do you want to
accomplish with it? Which part of J(ava)Script programming have you
problems with?

Please read <http://www.jibbering.com/faq/#FAQ2_3>.
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
Jun 30 '08 #2
I think what shes trying to explain is have a hidden div containing
results which then displays after the user clicks on the 'Add' link.

Aditya, try this...

<div id='results' style='display:none;'>
....
All your html results in a table
....
</div>

<button
onmouseup='document.getElementById("results").styl e.display="inline";'>Add</
button>

Graham
Jul 1 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: sklett | last post by:
Hi I have code that writes links, these links call a javascript function and pass in a url. So let;s say I have a client side function like this function DoIt( url ) { alert(url); }
8
by: Johnny Knoxville | last post by:
I've added a favicon to my site (http://lazyape.filetap.com/) which works fine if you add the site to favourites the normal way, but I have some JavaScript code on a couple of pages with a link,...
2
by: ASallade | last post by:
Hello, I've scoured my books and the web, but am still daunted, hopefully some of the users in this newsgroup will have advice for my problem. I am not an experienced javascript programmer,...
3
by: P Wolpert | last post by:
This is my first post. I hope I don't sound stupid. I have a script conflict when I put two scripts on one page. Both scripts will work if I use one at a time but the menu button script will not...
1
by: rainbowii7 | last post by:
Calling all programmers for helllllllllllllllppppp!!! i am currently doing a uni degree and our lecturers have set us the task of making a game in JavaScript. i chose to do a hangman game and...
7
by: fox | last post by:
Hi, Lacking javascript knowledge, I just realized why my project has a bug. I am using ASP to loop through a set of records while it creates URLs with a querystring that has a single value pair....
8
by: | last post by:
The problem lies here eval("document.TeeForm.amt.value(S+M)"); S and M suppose to add up and the total suppose to appear on the AMT field but it didn't. Any help? ...
5
by: althafexcel | last post by:
hi everyone Im trying to include an external js in my aspx page under the head tag, it doesn't load or it displays an object expected error whenver the function from the .js is called. Actually...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.