Re: [OT] JS snippet needed
This WebDNA talk-list message is from 2006
It keeps the original formatting.
numero = 66892
interpreted = N
texte = Donovan,Here's something I threw together off the top of my head. Haven't tested it, but it should work or at least get you claose...function updateimage(whichpic){ var pics = new Array(); // create an array for the images pics[1] = new Array("red.gif","blue.gif","green.gif","yellow.gif"); if(document.layers){ //NN4 DOM document.piconeDiv.document.images['__COLOR'].src="images/"+pics[whichpic]; }else{ //Other DOMs document.__COLOR.src="images/"+pics[whichpic];}
Red Blue Green Yellow MarcDonovan Brooke wrote:> Hello,> I'm trying to update an image when a user selects> between the different options in a select menu.> > Something like:> > -- >
onChange='javascript:updateimage()'>> -- > > The function and image var is what I need.> > I've preloaded the appropriate images.. but can't> seem to figure out how to call that image so that> it updates every time someone selects.> > idears?> > TIA,> Donovan> > > > > -- -------------------------------------------Marc ThompsonSoftware EngineerOffice of Information TechnologyUniversity of Utah801.585.9264marc.thompson@utah.edu--------------------------------------------------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Donovan,Here's something I threw together off the top of my head. Haven't tested it, but it should work or at least get you claose...function updateimage(whichpic){ var pics = new Array(); // create an array for the images pics[1] = new Array("red.gif","blue.gif","green.gif","yellow.gif"); if(document.layers){ //NN4 DOM document.piconeDiv.document.images['__COLOR'].src="images/"+pics[whichpic]; }else{ //Other DOMs document.__COLOR.src="images/"+pics[whichpic];} Red Blue Green Yellow MarcDonovan Brooke wrote:> Hello,> I'm trying to update an image when a user selects> between the different options in a select menu.> > Something like:> > -- > onChange='javascript:updateimage()'>> -- > > The function and image var is what I need.> > I've preloaded the appropriate images.. but can't> seem to figure out how to call that image so that> it updates every time someone selects.> > idears?> > TIA,> Donovan> > > > > -- -------------------------------------------Marc ThompsonSoftware EngineerOffice of Information TechnologyUniversity of Utah801.585.9264marc.thompson@utah.edu--------------------------------------------------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Marc Thompson
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Passing Username and Password on the command line (2000)
fileinfo syntax undocumented (2000)
shipcost (1997)
Classified (1999)
WebCatb15 Mac CGI -- [purchase] (1997)
Plugin or CGI or both (1997)
OT: MacAuthorize (2001)
Quit revisited (1997)
method of payment (1997)
Emailer [cart] file names (1997)
Templates for Customer Database? (1997)
WebDNA can't be controlled from terminal (2004)
New reserved words for [tags] (2000)
NetCloak, FireSite and PIXO (2000)
delete credit card number (2002)
WC1.6 to WC2 date formatting (1997)
user selectable sort order (2000)
WebCat with WebTen (1998)
PROBLEM (1997)
Incrementing a number (1998)