lokeshm Posted May 21, 2006 Share Posted May 21, 2006 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.eRegardsBeethoven. Quote Link to comment https://forums.phpfreaks.com/topic/10107-form-element-event-trigger/ Share on other sites More sharing options...
Barand Posted May 21, 2006 Share Posted May 21, 2006 Best way is to use [a href=\"http://members.aol.com/barryaandrew/xmlhttp/article.html\" target=\"_blank\"]xmlhttp request[/a] Quote Link to comment https://forums.phpfreaks.com/topic/10107-form-element-event-trigger/#findComment-37608 Share on other sites More sharing options...
.josh Posted May 21, 2006 Share Posted May 21, 2006 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). Quote Link to comment https://forums.phpfreaks.com/topic/10107-form-element-event-trigger/#findComment-37621 Share on other sites More sharing options...
lokeshm Posted May 23, 2006 Author Share Posted May 23, 2006 Dear Barand and CrayonMy 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. Quote Link to comment https://forums.phpfreaks.com/topic/10107-form-element-event-trigger/#findComment-38245 Share on other sites More sharing options...
appeland Posted May 23, 2006 Share Posted May 23, 2006 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 choosencustomer.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 Quote Link to comment https://forums.phpfreaks.com/topic/10107-form-element-event-trigger/#findComment-38321 Share on other sites More sharing options...
lokeshm Posted May 25, 2006 Author Share Posted May 25, 2006 Thanks AndiYou 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 peopleThanks AndiThank you allRegardsBeethoven Quote Link to comment https://forums.phpfreaks.com/topic/10107-form-element-event-trigger/#findComment-38862 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.