Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • 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
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

link inside another link?  RSS feed

 
Marshal
Posts: 67226
170
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
Posts: 17344
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
Posts: 17344
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
Marshal
Posts: 67226
170
IntelliJ IDE Java jQuery Mac Mac OS X
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!