• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

link inside another link?  RSS feed

 
Author and ninkuma
Marshal
Posts: 66826
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you can't embed actual links (<a> elements) within other links. But you can certainly have event handlers at different levels on elements that can be nested. You need to be careful what the inner link is doing as it can prevent the event from propagating upwards in the DOM.
 
Mark Spritzler
ranger
Sheriff
Posts: 17314
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Well, you can't embed actual links (<a> elements) within other links. But you can certainly have event handlers at different levels on elements that can be nested. You need to be careful what the inner link is doing as it can prevent the event from propagating upwards in the DOM.



Cool, so I have to do it without a links and just javascript and events. If the inner is clicked I actually don't want the outer to fire. Basically, it will be a list of users which you can click on any and invite as friends. But inside the user info is their twitter account name that you can click on and it will go to Twitter in another tab/window, so if you click the twitter link, I don't want to send a friend request in that case.

Thanks again for you help.

By the way, in my aboutus (funny us as in just me) I mention you and Eric.

Mark
 
Mark Spritzler
ranger
Sheriff
Posts: 17314
11
IntelliJ IDE Mac Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a screenshot of the aboutus

Mark
aboutus.png
[Thumbnail for aboutus.png]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66826
168
IntelliJ IDE Java jQuery Mac Mac OS X
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!