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:
suggestions for a good text editor on windows? (2005)
WebCat for mass emailings (1997)
Word wrapping (1997)
Comments in db? (1997)
price totals (2003)
forming a SKU (1999)
Document Contains No Data! (1997)
How can I Add several Items into the cart at once? (1997)
[WebDNA] JSON Parser (2014)
2nd WebCatalog2 Feature Request (1996)
Reversed words (1997)
carriage returns in data (1997)
WebTV problems with WebCatalog?? (1998)
Only charge card when product shipped ? (1997)
Summary search -- speed (1997)
Intermitent problem using [referrer] (1997)
6.0 upgrade issue? (2005)
Frames and WebCat (1997)
template cache problem (1998)
(1997)