Jump to content

Call php function using ajax


NotSureILikePHP

Recommended Posts

I have a dropdown menu that loads multiple locations for customers, i.e. Walmart has a location in Georgia and Louisiana. When I select the Georgia location data is filled using that location id like the phone, address, etc.

 

The problem is that my company is using an open source software for their ticketing system and they have dramatically changed the way they do things on this new upgrade that I am trying to set up. Now when that onchange event is fired, causing a postback, it throws a CSRF Token Validation error. The guys that code that system aren't usually very helpful so I thought that maybe I could use ajax to avoid the postback and still populate the data. The data is pulled from the querystring on page load for the location ID and then that ID is used to call a function in a different php page. Is there a way I can call that function from ajax or do I need to copy that code to a separate blank php page?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.