Jump to content

Content appear AFTER selection of <select>?


rootKID

Recommended Posts

Hello W3S! Been a while, as always :P

 

I am sure i have asked of this before, but since my USB-Flash has been stolen in the school by someone, i am about to re-do a lot of projects and i cannot find the other posts on this website for some reason (my past post), so here i "probably" ask again in the hopes of you guys helping me a little bit.

 

I know how to make a simple <select> filled with values, but i want some content (div-box with class content) to be shown AFTER a specific thing has been selected from the select-form. What do i need to use here? I could imagine some sort of JS/jQuery code combined with PHP? And if so, can someone guide me to the right path of where to look? Been trying to google but without luck :/

 

Anyhow, hoping you all good, and good to be back again :)

Link to comment
Share on other sites

In general, you need to put an event handler on the select element to respond when an item gets selected, and you can do whatever you want from there. You could get the selected value and use ajax to send it to the server and get a response back, or look it up in a Javascript array, or however you want to do it.

Link to comment
Share on other sites

okay thanks, i think i got it now ^^

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...