Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Posts
    103
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Question about onchange

    Hello Guys,

    I have the following code

    PHP Code:
    <input type="radio"  name="profileNew" onchange=" $('input[name=image_select]').val($(this).val());  return false;"  value="${name}">Set as default image 
    This code enables me to select a radio button and it will set my image a default image.

    Is there any javascript that I could add to this onchange to make it a default selection automatically?

    I hope I made myself clear if not please feel free to ask questions..

    Thanks in advance for your help.

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    3,760
    Thanks
    23
    Thanked 546 Times in 545 Posts
    You'll need to set your image as selected in your code and add this to the button
    Code:
    <input type="radio" checked="checked"  name="profileNew"  ...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •