Hi this is my HTML code::::
<form>
<fieldset >
<legend><b>TRIP</b></legend>
<p>
<input type = "radio"
name = "radSize"
id = "sizeSmall"
value = "Pligrimage"
/>Pilgrimage</br>
<input type = "radio"
name = "radSize"
id = "sizeMed"
value = "Vaccation" />Vaccation</br>
</p>
</fieldset>
</form>
i have two problem’s (1.) while using <fieldset> i want that the box should be just confined to text length it should not expand to whole line.(2.) is it possible to write an Onclick event for radiobutton,if so can you please tell me how to write it so that first radio button calls pilg.html and the second call vacc.html on their click event.
Your first problem is solved by giving the fieldset a fixed width. If you want this to be dynamic it can be done in css or javascript, but I think a fixed width should suffice in your case.
Your second question can be solved using javascript, but I am not sure why you need these to be radio inputs. Links would be much better here.
Please see the following fiddle.
http://jsfiddle.net/mrfunnel/EUgLt/2/