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 4 of 4
  1. #1
    New Coder
    Join Date
    Aug 2006
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How disabled onclick????

    Hi everybody
    I have <table> </table> tag and it have an event onclick which is programed by javascript, I can't change this code.

    I have caught event onclick like: <table onclick = "alert('HI!!')">
    So, when I click thi table in the browser, 2 event fire:
    One: show alert
    Two: the action which programed
    Now I want disable event onclick when click this tag.
    Are there any solution???
    Please, help me!

    Thanks

  • #2
    Senior Coder
    Join Date
    Feb 2006
    Location
    USA
    Posts
    1,013
    Thanks
    0
    Thanked 0 Times in 0 Posts
    We would need to see the code that adds the other onclick event handler to the <table>.
    Learn CSS. | SSI | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions
    Java != JavaScript && JScript != JavaScript
    Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around.

  • #3
    Regular Coder GSimpson's Avatar
    Join Date
    Aug 2006
    Location
    New Zealand
    Posts
    268
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Is this what you are looking for?? you can change the window.location thing.

    <html>
    <head>
    <title>TABLE FUNCTIONS</title>
    <script language="javascript" type="text/javascript">

    function yourfunction() { window.location="location.htm"; }

    </script>
    </head>

    <body>


    <table onclick=" alert('HI!!'); yourfunction();" border="1">


    <tr>
    <td colspan="2" rowspan="2">HI!</td>
    </tr>


    </table>


    </body>
    </html>
    The internet is my Sandbox, and notepad is my Spade n' Bucket.

  • #4
    New Coder
    Join Date
    Aug 2006
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks everybody. I capitulate!
    But I'll solve it later.
    Problem is: ActiveX give some code which I don't want. After many hours works, I saw them specifically. Just remove them .
    Not easy, I will solve this problem later

    Now, I am having a project.

    Thanks everybody


  •  

    Posting Permissions

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