• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

need some help here

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, here's the problem. Essentially I wrote some javascript to display 1 of 2 (we'll call them image a and b) images depending on which link is clicked. I have 4 different sets of these, but I also want to have 2 "main" buttons so that if you click one of them, for example, all of the image "a's" would come up. I am sure this is not to difficult problem, but I'm a little new to javascript. Thanx for the help.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Matt,
Welcome to the Ranch!
You might find more pertinent help with Javascript in the HTML/Javascript forum.
As to your question, I wasn't completely sure what you are after. Could you elaborate? (Preferable in a new post in aforementioned forum).
bear
 
village idiot
Posts: 1208
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you might be confusing Java, which is a programming language, with Javascript, which is used in HTML documents to accomplish special little chores that make your page do cool things. They aren't the same thing, although the names are similar.
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the HTML and Javascript forum
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
not that hard, you would need to call a function and change the sources
document.getElementById("ImageID1").src="blah"
document.getElementById("ImageID2").src="blah"
you would need to add an ID to the images...
Eric
 
reply
    Bookmark Topic Watch Topic
  • New Topic