Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    May 2009
    Location
    Chennai
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Angry hover text inside td when using onclick

    <td style="padding:5px;cursor:hand;" onclick="" title="Click for Metric details by status">metricName</td>

    with href it is working.
    it is not good when u use div for that td. page goes into up.
    when u use onclick function it is working, page is in the same div.

    can u give solution for this
    Last edited by RamaRao; 05-14-2009 at 10:19 AM.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,852
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Please elaborate a little more...
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Regular Coder
    Join Date
    May 2008
    Location
    Oxford, UK
    Posts
    422
    Thanks
    14
    Thanked 27 Times in 27 Posts
    either add

    Code:
    <td style="padding:5px;cursor:hand;" onclick="" title="Click for Metric details by status"><a href="#">metricName</a></td>
    or

    Code:
    <td style="padding:5px;cursor:hand;"title="Click for Metric details by status"><a href="javascript:functionName()">metricName</a></td>

  • Users who have thanked brazenskies for this post:

    RamaRao (05-14-2009)

  • #4
    New to the CF scene
    Join Date
    May 2009
    Location
    Chennai
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thank you for ur reply.

    can u give another solution without using href.
    i know with href it is working.
    wats problem with href -- i m using div. when u click link page goes to up.
    scroll into view is not working.

  • #5
    New to the CF scene
    Join Date
    May 2009
    Location
    Chennai
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by brazenskies View Post
    either add

    Code:
    <td style="padding:5px;cursor:hand;" onclick="" title="Click for Metric details by status"><a href="#">metricName</a></td>
    or

    Code:
    <td style="padding:5px;cursor:hand;"title="Click for Metric details by status"><a href="javascript:functionName()">metricName</a></td>

    Thank you for ur reply.

    can u give another solution without using href.
    i know with href it is working.
    wats problem with href -- i m using div. when u click link page goes to up.
    scroll into view is not working.




    <td style="padding:5px;cursor:hand;" onclick="" title="Click for Metric details by status">metricName</td>

    with href it is working.
    it is not good when u use div for that td. page goes into up.
    when u use onclick function it is working, page is in the same div.

    can u give solution for this

  • #6
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,852
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Not sure
    Code:
    <td style="padding:5px;cursor:hand;" title="Click for Metric details by status"><a href="#" onclick="functionName(); return false;">metricName</a></td>
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #7
    Regular Coder
    Join Date
    May 2008
    Location
    Oxford, UK
    Posts
    422
    Thanks
    14
    Thanked 27 Times in 27 Posts
    if you give your 'a' tag a hover color and pointer change and use this it will not go to the top of the page...

    Code:
    a:hover{color:#006699;cursor:pointer;}
    and...
    Code:
    <td style="padding:5px;cursor:hand;" title="Click for Metric details by status"><a  onclick="functionName()">metricName</a></td>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •