#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2012
    Posts
    2
    Rep Power
    0

    Display image and text according to radio button selected


    I would like to create a simple page, which needs to display a text and an image according to the radio button selected

    If another radio button is selected the text and image displayed should change

    I would need help with the coding esp the java script part
  2. #2
  3. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,124
    Rep Power
    4304
    Welcome to DevShed Forums, manoj2599.

    Here's a demo that's similar to what you want: Show a Textbox When a Radio Button is Selected
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2012
    Posts
    2
    Rep Power
    0
    Kravvitz, thanks for your reply, Im not so familiar with Javascript at all. Could you also explain how to display a picture and text when the radio button is selected in the place of the text box

    I would like the code to be very simple and brief, would appreciate if you could help me this one
  6. #4
  7. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,124
    Rep Power
    4304
    Sorry, I'm not willing to write it for you.

    Here are some JavaScript tutorials:
    url=http://eloquentjavascript.net/]Eloquent JavaScript: A Modern Introduction to Programming[/url]
    JavaScript Tutorial
    JavaScript Tutorial for Programmers
    Script Smarter: Quality JavaScript from Scratch
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).

IMN logo majestic logo threadwatch logo seochat tools logo