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

D

Dennis

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
 
D

Dennis

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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top