non-hyperlink clickable text?

Discussion in 'HTML' started by Richard, Dec 14, 2004.

  1. Richard

    Richard Guest

    Is it possible to create clickable text that does not redirect the browser
    to another URL? I'm trying to use the <A> tag strictly for triggering a
    javascript function but this seems impossible because it will not create
    hypertext unless there is a URL specified.. and that just screws things up.
    Is the a way around this? I'm writing in ASP.NET if that makes a difference.
    Thanks in advance for your help.

    Regards,
    Richard
    Richard, Dec 14, 2004
    #1
    1. Advertising

  2. Richard

    Noozer Guest

    "Richard" <> wrote in message
    news:...
    > Is it possible to create clickable text that does not redirect the browser
    > to another URL? I'm trying to use the <A> tag strictly for triggering a
    > javascript function but this seems impossible because it will not create
    > hypertext unless there is a URL specified.. and that just screws things

    up.
    > Is the a way around this? I'm writing in ASP.NET if that makes a

    difference.
    > Thanks in advance for your help.


    <a href="#" onclick="dosomething(); return(false);">Some text here</a>

    ....or something very close to that.
    Noozer, Dec 14, 2004
    #2
    1. Advertising

  3. Richard

    Psych971 Guest

    cool thanks!

    "Noozer" <> wrote in message
    news:qMDvd.485109$Pl.28362@pd7tw1no...
    >
    > "Richard" <> wrote in message
    > news:...
    >> Is it possible to create clickable text that does not redirect the
    >> browser
    >> to another URL? I'm trying to use the <A> tag strictly for triggering a
    >> javascript function but this seems impossible because it will not create
    >> hypertext unless there is a URL specified.. and that just screws things

    > up.
    >> Is the a way around this? I'm writing in ASP.NET if that makes a

    > difference.
    >> Thanks in advance for your help.

    >
    > <a href="#" onclick="dosomething(); return(false);">Some text here</a>
    >
    > ...or something very close to that.
    >
    >
    >
    Psych971, Dec 14, 2004
    #3
  4. Richard

    Mark Parnell Guest

    Previously in alt.html, Noozer <> said:

    > <a href="#" onclick="dosomething(); return(false);">Some text here</a>


    But be aware that anyone with Javascript disabled/unavailable will
    probably just get taken to the top of the page. Better to write the
    above on the page with Javascript in the first place, so that those
    without Javascript don't even see the link.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    Mark Parnell, Dec 14, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Oscar
    Replies:
    1
    Views:
    575
    Andrew Thompson
    Nov 24, 2004
  2. davetichenor
    Replies:
    1
    Views:
    818
    Eliyahu Goldin
    Oct 30, 2006
  3. Daniel Walzenbach

    How to create a TextBox containing a (clickable) Hyperlink??

    Daniel Walzenbach, Dec 2, 2003, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    345
    Daniel Walzenbach
    Dec 2, 2003
  4. BTHOMASinOHIO
    Replies:
    2
    Views:
    155
  5. Jason Hsu, Mr. Swift Linux

    How do I use PyGTK to put text besides clickable buttons?

    Jason Hsu, Mr. Swift Linux, Mar 30, 2012, in forum: Python
    Replies:
    0
    Views:
    180
    Jason Hsu, Mr. Swift Linux
    Mar 30, 2012
Loading...

Share This Page