1. Dominion Wealth Law, PLLC Gainesville VA Probate Lawyer | Haymarket Virginia Wills & Trusts Lawyer | Herndon Tax Planning For representation in probate and other legal matters, contact a lawyer at Dominion Wealth Law, PLLC, in Gainesville, Virginia, today: call 703-753-2305.
2. Coates & Davenport, P.C. Richmond Criminal and Family Law Attorney | Chesterfield Bankruptcy County Attorney | Henrico County Representation for all your legal problems. Call the respected Richmond law firm of Coates & Davenport at 804-285-7000.
3. Wade, Friedman & Sutter, P.C. Alexandria VA Attorneys | Bankruptcy Business Divorce Criminal Defense Estate Law | Arlington/Fairfa Discuss your difficult legal problems with the experienced lawyers of Wade, Friedman & Sutter, P.C., serving the Alexandria, Virginia, area: 703-836-9030.
Enhance your legal case details with LawyerLand AI's
intelligent guidance, connect with numerous qualified law firms in your area, and find the ideal
legal representation through our competitive chat platform.
;
document.addEventListener('DOMContentLoaded', function () {
// Reference to the form elements
const categorySelect = document.getElementById('category');
const subcategorySelect = document.getElementById('subcategory');
if (categorySelect && subcategorySelect) {
// Function to update subcategories based on selected category
function updateSubcategories() {
// Store current selection if any
const currentSelection = subcategorySelect.value;
// Clear existing options
subcategorySelect.innerHTML = '';
// Get selected category
const selectedCategory = categorySelect.value;
// If no category selected, hide subcategory dropdown
if (!selectedCategory) {
subcategorySelect.disabled = true;
return;
}
// Enable the dropdown
subcategorySelect.disabled = false;
// If we have subcategories for this category, add them
if (subcategories[selectedCategory]) {
subcategories[selectedCategory].forEach(function (subcat) {
const option = document.createElement('option');
option.value = subcat;
option.textContent = subcat;
// Set selected if matches current selection or matches the subcategory variable
if (subcat === currentSelection ||
subcat === 'Eminent Domain') {
option.selected = true;
}
subcategorySelect.appendChild(option);
});
}
}
// Attach event listener to category dropdown
categorySelect.addEventListener('change', updateSubcategories);
// Initialize subcategories on page load
updateSubcategories();
// If category is pre-set, make sure subcategories get populated
setTimeout(function () {
updateSubcategories();
}, 100);
}
});