hi all,
we r using JavaScript and PHP together... we are facing a problem in passing JS variable to PHP. On selecting from a drop down menu (HTML), we select a particular value. Now we want, according to this value, the related values thaty are there in the data base shld be shown in another textbox. (FOr ex. like in Hotmail registereation, on choosing the country, corresponding states are dispalyed, in a drop down menu. If these states are stored in the table, how do we access it???) PLease heeeeeeeeeeeelp Deepali ------------------------------------------------- Sify Mail - now with Anti-virus protection powered by Trend Micro, USA. Know more at http://mail.sify.com
Sify Power mail- a Premium Service from Sify Mail! know more at http://mail.sify.com
Deepali Naik wrote:
we r using JavaScript and PHP together... we are facing a problem in passing JS variable to PHP.
Aaaaarrrghh!!!
:-)))
On selecting from a drop down menu (HTML), we select a particular value. Now we want, according to this value, the related values thaty are there in the data base shld be shown in another textbox. (FOr ex. like in Hotmail registereation, on choosing the country, corresponding states are dispalyed, in a drop down menu. If these states are stored in the table, how do we access it???)
In onSelect (or whatever the hell) event, you have to reload the page using document.reload() (or whatever the hell) with the extra parameter. Check for this parameter in your PHP and return the results accordingly.
You're probably learning how to build web apps. Good going. Learn the concepts; that's more important than learning XYZ technology (like PHP, JavaScript).
DON'T ask for PHP help on this list. This is NOT a PHP list. This is a GNU/Linux list. Next time, no one is going to help (and they'll spam you to death).
-Manish
Manish Jethani writes:
DON'T ask for PHP help on this list. This is NOT a PHP list. This is a GNU/Linux list. Next time, no one is going to help (and they'll spam you to death).
But isn't PHP free software. This isn't just a GNU/Linux list but also a free software list as far as I can see. Also - a humble request - plz tone down your replies. We don't want to be percieved as unfriendly to newbies/question posers.
Vinayak Hegde APGDST Student NCST-JUHU
vinayak_hegde@softhome.net wrote:
Manish Jethani writes:
DON'T ask for PHP help on this list. This is NOT a PHP list. This is a GNU/Linux list. Next time, no one is going to help (and they'll spam you to death).
But isn't PHP free software. This isn't just a GNU/Linux list but also a free software list as far as I can see. Also - a humble
This IS just a GNU/Linux list. It's written on the walls.
It's one thing to ask for help configuring PHP on your box. But this was just asking for how to program in PHP/JavaScript. It's like asking beginner C questions on this list just because GCC is free software.
request - plz tone down your replies. We don't want to be percieved as unfriendly to newbies/question posers.
I think my reply was very friendly, by ilug-bom standards :)
BTW you want to be friendly to someone who has just sent unsolicited junk mail to 200+ mailboxes, ignoring list guidelines, in the name of free software. Same here.
The question was clearly off topic, I hope you'll agree.
It has been observed that almost all of the off topic posts come from first-time posters. Let them be moderated until they prove themselves. That's my 2-bit solution for this problem.
-Manish
-----Original Message----- From: linuxers-admin@mm.ilug-bom.org.in [mailto:linuxers-admin@mm.ilug-bom.org.in]On Behalf Of Deepali Naik Sent: Monday, March 31, 2003 1:30 PM On selecting from a drop down menu (HTML), we select a particular value.
Now we want, according >>to this value, the related values thaty are there in the data base shld be shown in another
textbox.
YOu can do this in two ways.. 1. Write a code in client side script to submit the form when onchange() event is called. Then at the server catch the selected value and then output <option></option> tags to populate the other drop down box. 2. You can put the complete main value - subvalue pair in the client side array while page is loaded. then using client side script written for onchange(), populate the second drop down box automatically.
Kiran Ghag Software Engineer @ Patni Computers, India Web Page: http://kiran7.freeservers.com _____
I used to live in a house by the freeway. When I went anywhere, I had to be going 65 MPH by the end of my driveway. I replaced the headlights in my car with strobe lights. Now it looks like I'm the only one moving. I was pulled over for speeding today. The officer said, "Don't you know the speed limit is 55 miles an hour?" And I said, "Yes, but I wasn't going to be out that long." I put a new engine in my car, but didn't take the old one out. Now my car goes 500 miles an hour. -- Steven Wright