Robert Granlund
asked on
JQuery Keep div showing after refresh or form fail
I have a piece of JQuery code in a form that shows a specific div, if a radio button is clicked.
in that hidden div are additional form fields that contain a SELECT box.
Right now if the form is submitted and fails or if the page refreshes, the initial div is closed. The second piece of code is meant to keep open the initial div upon refresh or form fail, cause the form select choices are sticky. BUT it does not work.
Any help? Does this question make sense?
$(document).ready(function() {
[b] $('input[type="radio"]').click(function() {
if ($(this).attr("value") == "Create New Team") {
$("#create_new_group").show('fast');
} [/b]
});
$('input[type="select"]').checked(function() {
if ($(this).attr("name") == "group_id") {
$("#join_group").show('fast');
}
});
});
in that hidden div are additional form fields that contain a SELECT box.
$(document).ready(function() {
[b] $('input[type="radio"]').click(function() {
if ($(this).attr("value") == "Create New Team") {
$("#create_new_group").show('fast');
} [/b]
});
[b]$('input[type="select"]').checked(function() {
if ($(this).attr("name") == "group_id") {
$("#join_group").show('fast');
}
});[/b]
});
Right now if the form is submitted and fails or if the page refreshes, the initial div is closed. The second piece of code is meant to keep open the initial div upon refresh or form fail, cause the form select choices are sticky. BUT it does not work.
Any help? Does this question make sense?
ASKER
How can I do it with php and making the radio buttons sticky?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I'm to much of a newbie to completely understand that, but thank you anyway!
ASKER
I will start the question over in a different way.
Cd&