Jump to content

Recommended Posts

Hi all,

 

My javascript is not good at all so thought I would ask for your help, hope this is the right place.

 

I have an admin page which allows properties to be entered (it's a real estate site).  One of the fields they fill in has simple text box where a number is entered which relates to a category table with the category description.  I tried to convince them to use a drop down and pick from there instead but to no avail.

 

What they want now is to have the category name display as soon as the code is entered in the box.

 

I know this can be done using a mix of php and javascript but really don't know where to start on the javascript.  I presume I need to build an array from the category tables then have javascript display the category description.

 

Can any one point me in the right direction?

 

Again, sorry if this isn't the right place for this.

 

Thanks,

 

Richard

Link to comment
https://forums.phpfreaks.com/topic/49058-dynamic-javascript-with-php-help-needed/
Share on other sites

you could use AJAX if there are quite a few categories. I couldnt point out one tutorial over another, but a quick google search on ajax and php will bring up quite a few. Also the AJAX forums here:

 

http://www.phpfreaks.com/forums/index.php/board,51.0.html

 

and the main phpfreaks site itself are also good starts.

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.