Solved

How to figure out , where exactly a user clicked

Posted on 2009-05-14
27
129 Views
Last Modified: 2013-11-23
Hi Experts,
           
           I want to know if its possible or not. if it is, then how exactly we do it.

         In the snap shot that I have attached, thr is a table. I am showing this table on my jsp page. According to my new requirement, I have to make the last column on this table as an html link.

         Now the question, how do we figure out, where exactly the user clicked. I mean I have to know the figure out the applicaton name as well for that particular cell.
Tab.PNG
0
Comment
Question by:aman0711
  • 13
  • 10
  • 4
27 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 24386644
>> I have to make the last column on this table as an html link.

What part of it - the percentage amount?
0
 
LVL 10

Author Comment

by:aman0711
ID: 24386697
Hi Charles :)
     Yes the percentage amount for now. Actually thr should be a flexibilty to make any column clickable later on in future. But for now percentage
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 300 total points
ID: 24386748
Just include the application name in the query string of the link you make from the percentage amount. e.g
<a href="somewhere.jsp?appname=ED_CO">50%</a>

Open in new window

0
 
LVL 10

Author Comment

by:aman0711
ID: 24386801
I actually I thought of this.... but wont work with the present requirement.
Let me explain you the present requirement in detail

0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24386849
I'm not sure why not - you're putting that value in the cell on the extreme left of the table ;-)
0
 
LVL 10

Author Comment

by:aman0711
ID: 24386987
hmmm because , this link will direct to a different page
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24387005
The link can direct to whatever page you want it to
0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 300 total points
ID: 24387042
If you don't want to go anywhere on click, you could set a hidden form field with javascript. e.g.
<a onclick="javascript:setLastClickedApp('ED_CO')">50%</a>

Open in new window

0
 
LVL 10

Author Comment

by:aman0711
ID: 24387183
Ok so here is the requirement.
All the for links for perfectage column will go the same page, lets say abc.jsp.

Now this abc.jsp contains some status messages specific to the application name.

So whent he user clicks on a particular cell in percentage column, I have to open the abc.jsp page and show him the status messages pertaining to that application only.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24387214
All that's consistent with my first suggestion:


  	
 

<a href="abc.jsp?appname=ED_CO">50%</a>

Open in new window

0
 
LVL 10

Author Comment

by:aman0711
ID: 24387245
Oh yeah now I got it :-)
Sorry Charles.

              and charles , could you give me a rough idea, how we achieve the other part like, show only the status codes that pertain to a specific application. That page is just a normal html page
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24387379
>>That page is just a normal html page

Now that's *in*consistent with your requirement, unless you have multiple pages already with the status codes in. If that's the case, then why don't you just do something like the following?


<a href="ED_CO-codes.html">50%</a>
 
 

....
 

<a href="ED_CP-codes.html">80%</a>

Open in new window

0
 
LVL 10

Author Comment

by:aman0711
ID: 24387605
Hmm this is what the problem is :-)

I dont have different pages for status code. just one page contains everything
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 300 total points
ID: 24387629
Well just use an anchor then for the right part of the page:
<a href="all-codes.html#ED_CO">50%</a>

 

 

....

 

<a href="all-codes.html#ED_CP">80%</a>

Open in new window

0
 
LVL 10

Author Comment

by:aman0711
ID: 24387712
O ok. this way, it will only highlight that portion of page right?
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24387815
It will move to that part of the page
0
 
LVL 10

Author Comment

by:aman0711
ID: 24387822
wow. this sounds cool :-)

Thanks Charles.... You always get me out of trouble :-)

Charles, I am facing a slight problem with commons digester, please have a look at it. will post it as a new question
0
 
LVL 92

Expert Comment

by:objects
ID: 24390748
how much information do you need to display?  If its not a lot you could display it on the same page without having to load a new page

0
 
LVL 10

Author Comment

by:aman0711
ID: 24390828
How Mick? Like a pop up menu?
0
 
LVL 92

Assisted Solution

by:objects
objects earned 200 total points
ID: 24390934
depends what the data is, you would display however was most appropriate
for example as done here http://www.objects.com.au/services/index.html

0
 
LVL 10

Author Comment

by:aman0711
ID: 24391523
Actually that html page contains status codes for all the application.
So lets assume it has 150 lines.
What I want is a way to show status codes just for that application (where user clicks)
The best way to think of this is a pop up when user mouse overs that particular cell, but is it achievable?
0
 
LVL 92

Assisted Solution

by:objects
objects earned 200 total points
ID: 24391694
Certainly possible. Be a bit more work but you'll end up with a better result.

If you want to stick with the requirement of loading a separate page then why not put the requested application status at the top of the page. Makes it clearer for the user.
0
 
LVL 10

Author Comment

by:aman0711
ID: 24391709
0
 
LVL 10

Author Comment

by:aman0711
ID: 24391710
Ooops, I wanted your suggestion on the link I posted above
0
 
LVL 92

Assisted Solution

by:objects
objects earned 200 total points
ID: 24391757
for putting the requested status at the top would just require a little login the jsp to check if a certain applin is requested. if it is then display that first, then display all the rest.

0
 
LVL 10

Author Closing Comment

by:aman0711
ID: 31581544
Thanks folks :)
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24422481
:-)
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now