[Javascript] Something better than getElementById
Troy III Ajnej
trojani2000 at hotmail.com
Sat Oct 22 23:08:42 CDT 2005
Sorry, but something like that is possible and still working only in IEssss.
The document.getUgly('byW3C.happyforIt') is the 'standard' for now.
-sorry if my post look's ugly, its because I've just installed the firefox,
sort of W3C standard!
<html><DIV>
<P align=center>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR>Troy
III<BR>progressive art
enterprise<BR>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</P></DIV></html>
<BLOCKQUOTE style='PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #A0C6E5
2px solid; MARGIN-RIGHT: 0px'><font
style='FONT-SIZE:11px;FONT-FAMILY:tahoma,sans-serif'><hr color=#A0C6E5
size=1>
From: <i>Terry Riegel <riegel at clearimageonline.com></i><br>Reply-To:
<i>"\[JavaScript List\]" <javascript at LaTech.edu></i><br>To:
<i>"\[JavaScript List\]"
<javascript at LaTech.edu></i><br>Subject: <i>Re: [Javascript] Something
better than getElementById</i><br>Date: <i>Fri, 21 Oct 2005 20:08:12
-0400</i><br>>I have a page that uses the code pasted
below<br>><br>>---<br>> var a =
document.getElementById(dest);<br>> a.className='sel'<br>>
document.browseform["fm_list"].value =
"|"+dest+b;<br>>
document.browseform["fm_cmd"].value = "";<br>>
document.browseformhere["fm_cmd"].value = "";<br>>
document.browseformhere["fm_list"].value =
"|"+dest+b;<br>>
document.browseform.submit();<br>>---<br>><br>><br>><br>>The
only reason I need to getElementById is to set the background <br>>color
to indicate the link is selected. Is there a way to set an
<br>>attribute without looking up the id? I am looking for ways to speed
<br>>up my pages, some have hundred's of ID's.<br>><br>>Something
like MyParentDiv.className='sel'<br>><br>><br>><br>>Here is the
HTML<br>><br>>---<br>><div class="nor"
id="images"><br>> <a
href="javascript:changedest2('images','DIR')"><img
src="/ <br>>clearimage/images/dir-small.gif"
border="0" width="12" height="12"
<br>>align="left"></a><br>> <a
href="javascript:changedest('images','DIR')"
<br>>ondblclick="changedest2('images','DIR')">images</a><br>></div><br>>---<br>>_______________________________________________<br>>Javascript
mailing
list<br>>Javascript at LaTech.edu<br>>https://lists.LaTech.edu/mailman/listinfo/javascript<br></font></BLOCKQUOTE>
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
More information about the Javascript
mailing list