Pages creating onclick="return TABLE1_onclick()" causing javascript errors

Discussion in 'ASP .Net' started by Dennis, May 16, 2006.

  1. Dennis

    Dennis Guest

    For some reason the HTML that is being created by my ASP.Net pages
    (2.0) have a table like this:

    <table border="0" cellpadding="0" cellspacing="0" style="z-index: 103;
    left: 0px; width: 100%; position: absolute; top: 0px;" id="TABLE1"
    onclick="return TABLE1_onclick()">

    This ends up causing a javascript error "Object excpected" when you
    click on the page because there is no TABLE1_onclick() function. Why
    is it doing this and what can I do to get it to stop? I'm not doing
    anything esoteric, just creating simple pages using a master page.

    Thanks,
    Dennis
     
    Dennis, May 16, 2006
    #1
    1. Advertising

  2. Dennis

    Dennis Guest

    I thought if I create a TABLE1_onclick function that does nothing it
    would stop the error. So I put one at the top of my ASP page.
    However, when the page is created for the browser, the function endd up
    being below the table tag that calls it, so it can't find it. If I
    manually modify the html and put the function above the tag, the error
    goes away. If there isn't any way to get rid of the call, is there a
    way I can have the javascript function rendered above the tag?
     
    Dennis, May 19, 2006
    #2
    1. Advertising

  3. Dennis

    sd Guest

    Re: Pages creating onclick="return TABLE1_onclick()" c ...

    fe
    ---
    Posted via DotNetSlackers.com
     
    sd, Dec 6, 2006
    #3
    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. Mark Goldin

    Errors, errors, errors

    Mark Goldin, Jan 17, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    985
    Mark Goldin
    Jan 17, 2004
  2. Replies:
    5
    Views:
    477
  3. Erland
    Replies:
    6
    Views:
    133
    Thomas 'PointedEars' Lahn
    Sep 6, 2007
  4. donpro
    Replies:
    1
    Views:
    104
    Thomas 'PointedEars' Lahn
    Oct 29, 2007
  5. donpro
    Replies:
    0
    Views:
    103
    donpro
    Oct 29, 2007
Loading...

Share This Page