TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Kalyani Shevale
NA
3.2k
710.9k
unchecked radio button that time only one textbox invisible
Nov 1 2018 5:00 AM
if checked on radio group button in "other option" that time textbox displayed .then another Question Same proces follewed .after unchecked in "other " option in radio button in one Question that time both textbox are hide...how to solve this problem??
when which Question other option is unchecked that time this only this textbox are hide???
foreach (
var
item
in
answer)
{
class
=
"col-md-12"
>
class
=
"col-md-11 test"
>
@{
if
(item.AnswerOption.Equals(
"Other (Please specify)"
))
{
class
=
"radio"
>
class
=
"col-md-4"
>
"radio"
name=
"
[email protected]
"
value=
"@item.Id"
id=
"@item.AnswerOption"
class
=
"rdcheck"
>
@item.AnswerOption
class
=
"col-md-8"
>
"text" name=
"
[email protected]
"
placeholder=
"Other Field"
class
=
"radioisother"
id=
"
[email protected]
"
>
}
else
{
"radio" name=
"
[email protected]
"
value=
"@item.Id"
id=
"@item.AnswerOption"
class
=
"radonotext"
> @item.AnswerOption
}
}
}
js code
$(
'.rdcheck'
).click(
function
() {
var
value = $(
'input[name=rdcheck]:checked'
).val();
var
rd = $(
this
).next(
'span'
).text();
var
test =
"rdother_"
+ $(
this
).val();
var
d = $(
this
).attr(
'id'
);
if
( d ==
"Other (Please specify)"
) {
var
test =
"rdother_"
+ $(
this
).val();
$(
'#'
+ test).show();
}
});
$(
'.radonotext'
).click(
function
() {
$(
'.radioisother'
).hide();
var
value = $(
'input[class=radonotext]:checked'
).val();
var
d = $(
this
).attr(
'id'
);
if
(d !=
"Other (Please specify)"
)
{
var
test =
"rdother_"
+ $(
this
).val();
$(
'.'
+ test).val(
""
);
$(
'.'
+ test).hide();
// $('.radioisother').val("");
}
});
Reply
Answers (
0
)
How to Delete DB from Azure
difference between Equals(o1,o2) and ReferenceEquals(o1,o2)