[Javascript] ---SOLVED --- Problem changing link's href prope rty...

Chris Nafziger CNafziger at sauder.com
Mon Jul 16 07:56:51 CDT 2001


smColor	smColor	smColor	smcolor

		smItemNoPic

		lgItemPic

		Link


The top four images (smColor) are small pictures that only contain one
color.  By default, lgItemPic, which is a picture of the item we want to
sell, contains a picture of the item where the item is white. By default,
smItemNoPic, which is simply a pic containing the items manufacturing
number, contains a pic of the item's manufacturing number for the white
version of the item we are selling.  By default, Link, which is a link that
goes to a product ordering page, has an href whose querystring contains the
item's part number.  When each of the smColor images are mouseovered,
smItemNoPic is updated with the new item number, lgItemPic is updated with a
picture of the same item (just in a different color), and Link's href is
modified to have a different querystring.



-----Original Message-----
From: Anthony E. [mailto:apwebdesign at yahoo.com]
Sent: Friday, July 13, 2001 4:44 PM
To: javascript at LaTech.edu
Subject: RE: [Javascript] ---SOLVED --- Problem changing link's href
prope rty...


out of curiousity, why wouldn't you just put the
correct link to begin with?

--- Chris Nafziger <CNafziger at sauder.com> wrote:
> 
> Thank you all for your help.
> 
> -----Original Message-----
> From: Anthony E. [mailto:apwebdesign at yahoo.com]
> Sent: Friday, July 13, 2001 1:14 PM
> To: javascript at LaTech.edu
> Subject: RE: [Javascript] Problem changing link's
> href property...
> 
> 
> Let me know if this works for you.
> 
> 
> 
> see attached()
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --- Chris Nafziger <CNafziger at sauder.com> wrote:
> > It didn't help.
> > 
> > -----Original Message-----
> > From: Anthony E. [mailto:apwebdesign at yahoo.com]
> > Sent: Thursday, July 12, 2001 7:38 PM
> > To: javascript at LaTech.edu
> > Subject: Re: [Javascript] Problem changing link's
> > href property...
> > 
> > 
> > try 
> > 
> > document.link.jumpTo.href = '/newpath/file.html';
> > 
> > 
> > 
> > --- Chris Nafziger <CNafziger at sauder.com> wrote:
> > > I'm having a problem with the function below. 
> The
> > > first two lines do what
> > > they are supposed to do just fine.  The third
> line
> > > does manage to change the
> > > URL of the link, however it only works if I use
> > the
> > > ID of zero that you see.
> > > If I replace the the zero with the value
> assigned
> > to
> > > the link's name
> > > property, 'JumpTo', similar to the first two
> > > function lines, the error
> > > 'document.links.JumpTo' is null or not an object
> > > comes up.  Why can't I use
> > > the link's name property value for the reference
> > > like I did with the images?
> > > 
> > > 
> > > // Function that swaps two images and changes
> the
> > > link URL 
> > > // when one of the swatch image's onMouseover
> > event
> > > fires.
> > > 
> > > function imageOn(i)
> > >     { 
> > >     document.images["Unit"].src =
> > UnitImages[i].src;
> > >     document.images["UnitNumber"].src =
> > > UnitNumberImages[i].src;
> > >     document.links[0].href = Page[i] 
> > >     }
> > > 
> > > <a href="LinkToPage.asp" name="JumpTo"
> > > id="JumpTo">Link</a>
> > > 
> > > _______________________________________________
> > > Javascript mailing list
> > > Javascript at LaTech.edu
> > >
> http://www.LaTech.edu/mailman/listinfo/javascript
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Get personalized email addresses from Yahoo! Mail
> > http://personal.mail.yahoo.com/
> > 
> > _______________________________________________
> > Javascript mailing list
> > Javascript at LaTech.edu
> > http://www.LaTech.edu/mailman/listinfo/javascript
> > 
> > _______________________________________________
> > Javascript mailing list
> > Javascript at LaTech.edu
> > http://www.LaTech.edu/mailman/listinfo/javascript
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> http://www.LaTech.edu/mailman/listinfo/javascript


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
http://www.LaTech.edu/mailman/listinfo/javascript



More information about the Javascript mailing list