[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to figure out , where exactly a user clicked

Posted on 2009-05-14
27
Medium Priority
?
137 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1200 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 1200 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
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 1200 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 800 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 800 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 800 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
This article discusses how to implement server side field validation and display customized error messages to the client.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

656 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