Can't run Javascript code in an aspx page?

U

UJ

I've got two pages - one actually is a control, the other a page. On the
control, I've got javascript code to make things visible/invisible at the
client side. All works good. I put the same code on a page and it's not
working. The first thing I noticed is that on this line:

<script language="javascript" type="text/javascript">

I'm getting an error within VS saying that 'Could not find any attribute
'type' of element 'script'

But it works fine on the ascx page.

In the actual javascript code, I do the following:

document.getElementByID('divAvailKits').style.display = 'none';

and get an error saying that there is no element for that. If I type
document. to get the list of methods/properties, getElementByID is not
listed. Yet if I go over to the ascx it works fine and is listed.

Any suggestions/thoughts I should look into? I'm at a loss as to why it
doesn't work on the aspx page.

TIA - Jeffrey.
 

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,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top