<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4134.600" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=042114615-13072001><FONT face=Arial color=#800000 size=2>Unless
I'm reading this incorrectly (JavaScript Bible - 4th ed., by Danny Goodman,
p.594), it *seems* that you can use document.links.href with IE4+ and NN6.
Also, I understand your recommendation... that would definitely be compatible
with more browsers, but I think I'm going with what I have so far using the
index since it's going on a private, IE5+ Extranet. If it were public, I'd
change it. Thanks Peter.</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Peter Brunone
[mailto:peter@brunone.com]<BR><B>Sent:</B> Friday, July 13, 2001 10:51
AM<BR><B>To:</B> javascript@LaTech.edu<BR><B>Subject:</B> Re: [Javascript]
Problem changing link's href property...<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Chris,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> I'm not familiar with the
document.links collection -- is it new, or an IE-only thing? -- but if you
can't get this working, I recommend having a hidden form field that stores the
current URL and making the link into a function call that changes
document.location.href .</FONT></DIV>
<DIV><FONT face=Arial size=2> Do let us know if you figure
it out off-list...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Cheers,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Peter</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=CNafziger@sauder.com href="mailto:CNafziger@sauder.com">Chris
Nafziger</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=javascript@LaTech.edu
href="mailto:'javascript@LaTech.edu'">'javascript@LaTech.edu'</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, July 12, 2001 3:55
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Javascript] Problem changing
link's href property...</DIV>
<DIV><BR></DIV>I'm having a problem with the function below. The first
two lines do what<BR>they are supposed to do just fine. The third line
does manage to change the<BR>URL of the link, however it only works if I use
the ID of zero that you see.<BR>If I replace the the zero with the value
assigned to the link's name<BR>property, 'JumpTo', similar to the first two
function lines, the error<BR>'document.links.JumpTo' is null or not an
object comes up. Why can't I use<BR>the link's name property value for
the reference like I did with the images?<BR><BR><BR>// Function that swaps
two images and changes the link URL <BR>// when one of the swatch image's
onMouseover event fires.<BR><BR>function imageOn(i)<BR> {
<BR> document.images["Unit"].src =
UnitImages[i].src;<BR> document.images["UnitNumber"].src =
UnitNumberImages[i].src;<BR> document.links[0].href =
Page[i] <BR> }<BR><BR><a href="LinkToPage.asp"
name="JumpTo"
id="JumpTo">Link</a><BR><BR>_______________________________________________<BR>Javascript
mailing list<BR><A
href="mailto:Javascript@LaTech.edu">Javascript@LaTech.edu</A><BR><A
href="http://www.LaTech.edu/mailman/listinfo/javascript">http://www.LaTech.edu/mailman/listinfo/javascript</A><BR></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>