Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8370747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:59:16+00:00 2026-06-09T13:59:16+00:00

I have three identical drop down lists that I’m populating using MySQL data. If

  • 0

I have three identical drop down lists that I’m populating using MySQL data.
If one of them changes index (onchange is fired), I want the other two to re-populate, so that they exclude the item that has been chosen with the other drop down list.

In ASP.NET, I would simply have called a function (passing through the chosen items’ value) in the code behind to re-populate the other two.

I’ve been poking around for a while now and I just can’t get it done with PHP. Does PHP allow function calling from this event? I’ve also tried using AJAX, but nothing.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T13:59:17+00:00Added an answer on June 9, 2026 at 1:59 pm

    You can’t (directly) call server side functions from the client side.

    You can make an HTTP request to a URL that runs a server side script that calls the function.

    ASP.NET has (I believe, I’ve never used it) some stuff that will set up a URL and generate some JavaScript that will call that URL for you.

    There is nothing in the PHP core to do that.

    A very rough, quick and dirty outline (that makes no attempt to be RESTful) of how you might go about doing something like that would be:

     callFunction.php:
     <?php
         include("myFunctions.php");
         if ($_GET['call'] == "functionA") {
             functionA();
         }
     ?>
    

    Then your JS would make an ajax request to callFunction.php?call=functionA.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Considering that all three variables have identical values, one would expect the following comparison
I have three tables. I have to retrieve the data using Linq statement. My
I have three UITableViews that should look identical. Each is placed inside a different
In this problem, I have three (identically-structured) lists. Two have all numbers and the
Have three divs in a container that I want to float over a large
i have three lists with the same number of elements in each other, i
I have three separate table variables in my Function, 1 of them is not
I have a drop down select box inside a div. When the user clicks
I have three projects - proj-a, proj-b, and main such that main depends on
I have three classes: SomeThing, SomeOtherThing, and YetAntherThing. All three have an identical member

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.