Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #36843

Re: How to make on-clickable div text look clickable

From "R.Wieser" <address@not.available>
Newsgroups comp.lang.javascript
Subject Re: How to make on-clickable div text look clickable
Date 2019-06-08 15:58 +0200
Organization Aioe.org NNTP Server
Message-ID <qdgetl$13lc$1@gioia.aioe.org> (permalink)
References <qdg0hs$kmc$1@dont-email.me>

Show all headers | View raw


James,

> do you have a preferred way of making that text look clickable?

As a reader ?   I would want to have it look like the real thing.  You know, 
underlined and with a certain color.

As a writer ?  I would probably use the "a" tag itself, setting the "href" 
property to "javascript:your_function()".  You know, letting the tag handle 
all the nitty-gritty of making the text look clickable.

https://stackoverflow.com/questions/7347786/html-anchor-tag-with-javascript-onclick-event?rq=1

Than again, I often go for the easiest solution (after having spend quite 
some time googeling and testing what the easiest solution might be :-) ).

> I should say I am not sure it would be good to use /all/ the browser's 
> default formatting for this case

In that case you will most likely confuse and (sooner rather than later) 
annoy the user, which expects a certain uniformity.

But you can ofcourse also go for Stefans suggsetion, and not change the text 
itself but putting it on a button.   Or maybe just a small button (with the 
letter "A" - for Answer - in it) at the end of the question.

Regards,
Rudy Wieser

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How to make on-clickable div text look clickable James Harris <james.harris.1@gmail.com> - 2019-06-08 10:52 +0100
  Re: How to make on-clickable div text look clickable Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-08 12:14 +0200
  Re: How to make on-clickable div text look clickable "R.Wieser" <address@not.available> - 2019-06-08 15:58 +0200
    Re: How to make on-clickable div text look clickable James Harris <james.harris.1@gmail.com> - 2019-06-08 19:25 +0100
      Re: How to make on-clickable div text look clickable Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-08 20:42 +0200
      Re: How to make on-clickable div text look clickable "R.Wieser" <address@not.available> - 2019-06-09 10:02 +0200
  Re: How to make on-clickable div text look clickable James Harris <james.harris.1@gmail.com> - 2019-06-08 19:17 +0100
    Re: How to make on-clickable div text look clickable Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-08 20:40 +0200

csiph-web