What should be the right code so that , I can open &
Show an another New form (may be called as "form1"),
on the same current window page (may be called as "page1") ,
as i click & select one of the two
radio button choices only , without "submit button".

Thanks & Regards

Member Avatar


You need javascript for this: easy enough:

if you have the second form like this:

<form id = "secondform" name = "secondform" style="display:none;" ....>

    (...the form is hidden by default...)


You can show this by the onclick attribute of the radio button on form1:

<form id="firstform" ...>
  <input type="radio" onclick="document.getElementById('secondform').style.display='block';return false;" ... /> (this shoes the second form)
  <input type="radio" onclick="document.getElementById('secondform').style.display='none';return false;" ... /> (this hides the form again)

HOWEVER, you may wish to to place the second form, not as a separate form but as an additional part to your first form (a div element with the style set to display:none) because you can only send one form at a time from a page.

If all your first form does is show/hide another form - fine no problem, but if you want to send data from the first form AND the second form, you should use the 'div' method.