Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Option/Radio Box
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

kolucoms6
Average Member

845 Posts

Posted - 21 June 2007 :  00:23:56  Show Profile

I am looking forward to :(I know it must be a simple javascript)

I will have Two Radio Buttons

Now, when use select radio1, it will display a,b,c,d field as input box.

When use select radio2, it will display e,f,g,h,i field as input box.

kolucoms6
Average Member

845 Posts

Posted - 21 June 2007 :  07:30:46  Show Profile

Basically...

Two RADIO BUTTONS :

Radio1
Radio2

When I select Radio1, it will display or may be make enable a,b,c,d .. four Input boxes.

When I select Radio2, it will display or may be make enable e,f,g,h .. four Input boxes.

Note : a,b,c,d,e,f,g,h,: Name of input Boxes.
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 21 June 2007 :  07:45:35  Show Profile  Visit AnonJr's Homepage
There are numerous scripts out there that do this (or something like it), and even more numerous articles on how to build said scripts. Have you spent a little time with your search engine of choice?
Go to Top of Page

kolucoms6
Average Member

845 Posts

Posted - 21 June 2007 :  12:44:24  Show Profile
I got below code:

<script type="text/javascript">
var _lastVisibleDiv = 0;
function ToggleView(objButton) {
var strDivId = "div_" + objButton.value;
var objDiv = document.getElementById(strDivId);
if (!objDiv) {
alert("debug warning: no such div " & strDivId);
return false;
}
if (_lastVisibleDiv)
_lastVisibleDiv.style.display = "none";
objDiv.style.display = "";
_lastVisibleDiv = objDiv;
}
</script>
<div id="div_radio1" style="display: none;">
First: <input type="text" name="text1" /><input type="text" name="text2" /><input type="text" name="text3" />
</div>
<div id="div_radio2" style="display: none;">
Second: <input type="text" name="text5" /><input type="text" name="text6" /><input type="text" name="text7" />
</div>
first<input type="radio" name="myradio" value="radio1" onclick="ToggleView(this);" />
second<input type="radio" name="myradio" value="radio2" onclick="ToggleView(this);" />


But it doesnt work when i place these inside a table.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.25 seconds. Powered By: Snitz Forums 2000 Version 3.4.07