How to figure out , where exactly a user clicked

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
LVL 10
aman0711Asked:
Who is Participating?
 
CEHJConnect With a Mentor Commented:
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
 
CEHJCommented:
>> I have to make the last column on this table as an html link.

What part of it - the percentage amount?
0
 
aman0711Author Commented:
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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
aman0711Author Commented:
I actually I thought of this.... but wont work with the present requirement.
Let me explain you the present requirement in detail

0
 
CEHJCommented:
I'm not sure why not - you're putting that value in the cell on the extreme left of the table ;-)
0
 
aman0711Author Commented:
hmmm because , this link will direct to a different page
0
 
CEHJCommented:
The link can direct to whatever page you want it to
0
 
CEHJConnect With a Mentor Commented:
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
 
aman0711Author Commented:
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
 
CEHJCommented:
All that's consistent with my first suggestion:


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

Open in new window

0
 
aman0711Author Commented:
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
 
CEHJCommented:
>>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
 
aman0711Author Commented:
Hmm this is what the problem is :-)

I dont have different pages for status code. just one page contains everything
0
 
CEHJConnect With a Mentor Commented:
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
 
aman0711Author Commented:
O ok. this way, it will only highlight that portion of page right?
0
 
CEHJCommented:
It will move to that part of the page
0
 
aman0711Author Commented:
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
 
objectsCommented:
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
 
aman0711Author Commented:
How Mick? Like a pop up menu?
0
 
objectsConnect With a Mentor Commented:
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
 
aman0711Author Commented:
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
 
objectsConnect With a Mentor Commented:
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
 
aman0711Author Commented:
0
 
aman0711Author Commented:
Ooops, I wanted your suggestion on the link I posted above
0
 
objectsConnect With a Mentor Commented:
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
 
aman0711Author Commented:
Thanks folks :)
0
 
CEHJCommented:
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.