Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Using label in javascript

Reply
Thread Tools

Using label in javascript

 
 
Vik
Guest
Posts: n/a
 
      04-01-2004
The following code returns an error message (null object):

document.forms[0]['Label1'].value='';

Is it possible to use an ASP or HTML label in JavaScript?

Thank you.




 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      04-01-2004
labels are not form elements, but rather are html elements, you have to use
the html dom to access them. try:

document.getElementById('Lable1').innerHTML = '';

-- bruce (sqlwork.com)


"Vik" <viktorum@==hotmail.com==> wrote in message
news:(E-Mail Removed)...
> The following code returns an error message (null object):
>
> document.forms[0]['Label1'].value='';
>
> Is it possible to use an ASP or HTML label in JavaScript?
>
> Thank you.
>
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
optimizing the switch statement in Duff's Device (casting a label, label abuse) anon.asdf@gmail.com C Programming 10 10-11-2007 03:59 PM
dll config and web.config and Label Expressions (binding label text to dll config settings) CSharpner ASP .Net 0 04-09-2007 09:00 PM
How to get/read Hard disk label / drive label Praveen Python 1 11-05-2006 07:48 PM
<label><div></div></label> allowed? Josef K. ASP .Net 3 05-22-2005 02:13 PM
label versus asp:label Question. Thanks. Shapper ASP .Net 2 05-07-2005 05:55 AM



Advertisments