Skip to content
Advertisement

change option value based on other dropdown PHP

I have 2 simple dropdown list that if city dropdown selected have value “Balikpapan” its display specific option on service dropdown then if not its display other option :

here’s my function code :

JavaScript

and here’s my dropdown code

JavaScript

Advertisement

Answer

You can use another option to display dropdown services as mentioned below. You can use ajax throw display content.

  1. Test.php

    JavaScript
  2. process-request.php

    JavaScript

Let me know if any query for the same.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement