Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: switch between 2 images

  1. #1
    Junior Member
    Join Date
    Mar 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default switch between 2 images

    how do i create a java code which switches between 2 pictures through 1 button.. i need to create 1 button to switch between 2 images.. pleaseeee helppp i have a deadline in half an hour

    "Your mission is, given an HTML page with one of those images on and a button, write the Javascript code to toggle the images - so if you click the button and the image shown is of the box open, it'll switch to the box closed. If you click the button when the image shown is of the box closed, it'll switch to the box open."

    http://fetlar.kingston.ac.uk/pp/jackbox-open.jpg

    Available at the URL http://fetlar.kingston.ac.uk/pp/jackbox-closed.jpg


  2. #2
    Think of me.... Mr.777's Avatar
    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    1,136
    My Mood
    Grumpy
    Thanks
    20
    Thanked 82 Times in 78 Posts
    Blog Entries
    1

    Default Re: switch between 2 images

    What have your tried so far?
    Anyone who stops learning is old, whether at twenty or eighty. Anyone who keeps learning stays young. The greatest thing in life is to keep your mind young.

    - Henry Ford

Similar Threads

  1. Case Switch Help?
    By xionyus in forum What's Wrong With My Code?
    Replies: 17
    Last Post: October 19th, 2011, 08:59 PM
  2. switch statement
    By Tank314 in forum What's Wrong With My Code?
    Replies: 4
    Last Post: October 9th, 2011, 01:23 PM
  3. Help with switch statements
    By suxen in forum Loops & Control Statements
    Replies: 4
    Last Post: February 15th, 2011, 03:55 AM
  4. Why Did You switch to Java?
    By Sisyphus in forum The Cafe
    Replies: 2
    Last Post: May 26th, 2010, 04:01 AM
  5. Switch Statment
    By 3XiLED in forum Java Theory & Questions
    Replies: 2
    Last Post: March 31st, 2010, 05:11 PM