Is this jquery input check adaptable to my form?

Hi there everyone!

I may have outsmarted myself.

I have a form that allows the user to input multiple manufacturer part numbers, as I’ve found it’s necessary to input “alternate” mpns for certain product.

Here’s a demo of my form(note the MPN input): https://wheeltastic.com/test.php

The MPN entries are made by entering the string then hitting enter(the form also passes the last string that gets entered even if you don’t hit enter).

I quickly found that it would be very useful to check these MPNs via jquery so I could save the user a lot of time inserting product details for an item that has already been inserted into the database.

So I found this tutorial: http://talkerscode.com/webtricks/check%20username%20and%20email%20availability%20from%20database%20using%20ajax.php

Which is just fantastic. It doesn’t require you to click anything to check the input which is what I’m hoping for.

The issue that I have is that I’m unable to get it to work with the current MPN form input.

Is it possible to adapt this jquery check to an input that allows multiple strings like this or am I out of luck?

Thanks for your time!

As I understand you want to use MPN input to check If an item exist in your database field?

That is correct. I would like to keep the current form of MPN input while adding the ability to check for previous existence in the database.

The issue I have specifically is adapting the included tutorial to an input that allows multiple entries, like my MPN input.

Ok I understand now.
First you must use an ajax function to retrieve the data from the database.In this function you must set type:"POST.
Then you must create a new layer or modal to show you the incoming data over the page that MPV exist.

It is an alternative method that when you fill the MPV input then via PHP query to retrieve your data and then redirect the user in another page that ( Location: eg/ page.php) so then to manipulate the incoming data or results as you want.I think that in this case you must use $_SESSION global variable so to restore an manipulate the data between different files.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.