Jump to content

Archived

This topic is now archived and is closed to further replies.

lokeshm

Form Element - Event Trigger

Recommended Posts

Guys,

1. I am creating a "Service Call Register" Form which Customer Info as well as "Problem Reported Details".
2. I have maintained Customer Info in "Customer Master" Table.
3. In the Form I have provided a Combo Box to fill in Customer Name,
4. Combo Box Values are populated from Customer Master Table.

Unitll here every thing works fine.
My next step is - The moment user selects a customer in Combo Box,
The same form should fetch and display Customer Address, Phone Numbers and Contact Person.
And the user continues entering "Problem Reported Details".

Is it possible to do in PHP.
If Yes, Please tell me how.

P.l.e.a.s.e
Regards
Beethoven.

Share this post


Link to post
Share on other sites
Best way is to use [a href=\"http://members.aol.com/barryaandrew/xmlhttp/article.html\" target=\"_blank\"]xmlhttp request[/a]

Share this post


Link to post
Share on other sites
translation: no, it is not possible with php alone. php is a server side language. you will need to look into ajax to do that (which is the part barand said).

Share this post


Link to post
Share on other sites
Dear Barand and Crayon

My Special Thanks to you both....
Barand I implemented the concept you have suggested and also used the xmlhttp.js file.
Barand, "Service Call Registration" is the first application I have worked on using PHP I am so much eager to show this application to you. I am very happy, it worked the way I wanted, Moreover it is extreemly fast.

I wont be able to thank you both enough.
Thanks again.

Regards,
Beethoven.

Share this post


Link to post
Share on other sites
Hello,
make one form for the combobox alone(you can still leave the rest of the form there, we just change the target and move the </form> tag later), assign a javascript onchange event to it to
submit the form once the customer has been choosen (I guess the value of the combobox options will be some kind of customer unique id = uid).
That form will point to itself basically, except that it now knows the uid of the previously choosen
customer.

In the form you have to do an if/else statement checking if the uid is there.
if it is it will change the forms target and not set the </form> for the previous "little" form that only choose the customer.
It also does not display the combobox anymore, but rather does a quick query to your Db to get the full customer details and displays them nicely formatted.

Good luck.
Andi

Share this post


Link to post
Share on other sites
Thanks Andi

You too have another way around as a solution for my question.
I shall try and see how your suggestion works out.
Way to learn from all of you people

Thanks Andi
Thank you all

Regards
Beethoven

Share this post


Link to post
Share on other sites

×

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.