Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-30-2012, 01:39 PM   PM User | #1
dk4210
New Coder

 
Join Date: Nov 2002
Posts: 99
Thanks: 13
Thanked 0 Times in 0 Posts
dk4210 is an unknown quantity at this point
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.
dk4210 is offline   Reply With Quote
Old 04-30-2012, 03:23 PM   PM User | #2
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,498
Thanks: 18
Thanked 361 Times in 360 Posts
sunfighter is on a distinguished road
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"  ...
sunfighter is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:23 AM.


Advertisement
Log in to turn off these ads.