• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Want to toggle content with a drop down without hitting a submit button.

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
I have two different price sheets for different states. When a user comes to my website I want them to first select which state they're in and the price sheet will just materialize without having to hit a submit button. I'm not too sure where I need to look to accomplish this
 
or, in ASP.NET

Code:
<asp:DropdownList ID="ddlState" runat="server" AutoPostBack="true" OnSelectedIndexChanged="StateChanged" />

protected void StateChanged(object sender, EventArgs e)
{
     LoadPrices();
}
 
Last edited:
For a super quick patch, you could literally just use the onChange event to submit the form.
 
You can preload the data into javascript arrays and do the filtering using the onchange event.

That will only work with small datasets.

For large datasets, you need to ajax the the event and jquery is probably the fastest and easiest toolkit to use.
 
Back
Top