• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Disable hyperlink and Mouseover

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a table with name and status as column fields to display names of person and status whether he is online or offline.
All rows has hyperlink.
I want to remove hyperlink and Mouseover icon for rows which has offline status

How to have this.

Thanks,
Jagadish
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How is this all being generated? JSP? PHP?

This sounds like something that would be handled much better on the server than as an after-thought on the client.
 
Vinutha Jagadish
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have created jsp with display tag





in my com.inc.Wrapper class, i am handling to disable hyperlink like this,

 
Bear Bibeault
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't use that library, but the correct solution is not create the hyperlinks in the first place when they are not appropriate.
 
Vinutha Jagadish
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i need hyperlink for rows which has got status online. So, if i remove hyperlink logic, how to create links for online status rows.
i want to disable hyperlinks with the help of Wrapper class where i need to include logic to remove hyperlink

i tried with below code



but this logic only disables the text but still i am able to click that row.
 
Sheriff
Posts: 28328
96
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Generate hyperlinks for lines which need hyperlinks. Generate something else for lines which don't need hyperlinks. Plain text seems like a good substitute to me, but it's up to you to choose something which works.
 
Vinutha Jagadish
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is the javaScript cal i am using in my jsp




This is the javascript function which our framework is using. This logic will generate hyperlinks for all rows in a table.
Now, how can i change this code to remove hyperlink for some of the rows.
Please explain with code if possible.

 
Paul Clapham
Sheriff
Posts: 28328
96
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Vinutha Jagadish wrote:This is the javascript function which our framework is using. This logic will generate hyperlinks for all rows in a table.
Now, how can i change this code to remove hyperlink for some of the rows.
Please explain with code if possible.



I still think that's the wrong thing to do. Just have the code generate hyperlinks only for the rows that should have them. Don't generate hyperlinks for all rows and then go back and un-generate them for the rows which should not have had them in the first place.
 
Been there. Done that. Went back for more. But this time, I took this tiny ad with me:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic