Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] unsubscribe
- From: stockholm99se at yahoo.se (TG)
- Subject: [Javascript] unsubscribe
- Date: Tue Jun 24 14:13:27 2003
--- Geoff Corriere <geoff@xxxxxxxx> skrev: > This is close: > > > I have tried using alert(document.images); and it > did trace to > > [object] which is correct, but when I try to do > > alert(document.images[nt_01]) or > alert(document.images[nt_01].src) all > > I get is an undefined and I don't know why. > > > > document.images[nt_01] does reference a specific > object, but you cannot > alert() an object. You can alert an attribute of an > object. > alert(document.images['nt_01'].name) would get you > what you want. Also, > note the ' ' used. images['img_name'] is an > associative array, so you > need quotes. The example I sent you placed the name > of the image in a > variable first: > > var next_image = "nt_01"; > alert(document.images[next_image].name); > > No quotes are needed in that example. > > > Geoff> _______________________________________________ > Javascript mailing list > Javascript@xxxxxxxxxx > https://lists.LaTech.edu/mailman/listinfo/javascript > _____________________________________________________ G? f?re i k?n och f? din sajt v?rderad p? nolltid med Yahoo! Express Se mer p?: http://se.docs.yahoo.com/info/express/help/index.html
- References:
- [Javascript] dynamic variables names
- From: Geoff Corriere
- [Javascript] dynamic variables names
- Prev by Date: [Javascript] dynamic variables names
- Next by Date: [Javascript] dynamic variables names
- Previous by thread: [Javascript] dynamic variables names
- Next by thread: [Javascript] dynamic variables names
- Index(es):