[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4284: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4286: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4287: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4288: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
www.dhtmlgoodies.com • View topic - Ajax dynamic list; second list
Advertisement

Ajax dynamic list; second list

Moderators: Calcifer, slothy

Ajax dynamic list; second list

Postby Abraxes » Sun Apr 09, 2006 12:51 am

Hoping this is the correct forum to post this in ...


After searching quite a bit, I've found this script over here:

Must say I'm impressed, it worked perfectly :D


But then I wanted to make a second field to use it with, as is explained in the text should possible;
The ajax_showOptions function takes two arguments. The first one should always be this, i.e. a reference to the text field. The second one is just a string that is sent to the file on the server. This is useful in case you are applying this feature to more than one text field. If you do, this string is something you could check on on the server(example: if "getCountriesByLetters" is set, find countries, if "getStatesByLetters" is set, get states etc.).

This on the other hand, did not go so well.


The situation;
I've made two input fields.
In one, the function is being called like this:
onkeyup="ajax_showOptions(this, 'getArtistsByLetters');"

In the other, the function is being called like this:
onkeyup="ajax_showOptions(this, 'getAlbumsByLetters');"

This page you can see here:
http://209.124.83.52/x/x.php
(I stripped away all things that are irrelevant atm.)

Here is what my file looks like that pulls the info from the DB, and the change made to the .js file:
http://209.124.83.52/x/explained.php


The issue;
The problem is, that if you enter the letter "b" into the first field, you get a nice list of artists.
If you now enter the letter "b" into the second field, you get that exact same list of artists, instead of a list of albums.

If you reload the page, and enter the letter "b" into the second field, you get a nice list of albums.
If you now enter the letter "b" into the first field, you get that exact same list of albums, instead of a list of artists.


Is the list somehow being saved and re-used?

If someone knows how to overcome this, it would be greatly appreciated.

Thanks you,
- Abra
Abraxes
 
Posts: 2
Joined: Sun Apr 09, 2006 12:27 am

Postby Batalf » Sun Apr 09, 2006 2:54 am

Hello Abraxes

Welcome to the forum.

There were a bug in the JS cache functionality. It didn't use separate cache for the different inputs. By implementing separate cache for each parameter, this problem should now have been solved.

You can download a new version from my site. The changes has been made to ajax-dynamic-list.js.
Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby Abraxes » Sun Apr 09, 2006 7:12 pm

Abraxes
 
Posts: 2
Joined: Sun Apr 09, 2006 12:27 am

Hidden a ID when select a country

Postby zedder69 » Tue Apr 18, 2006 2:03 pm

zedder69
 
Posts: 5
Joined: Tue Apr 18, 2006 2:00 pm
Location: Brazil

Postby Batalf » Tue Apr 18, 2006 2:20 pm

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby zedder69 » Tue Apr 18, 2006 2:54 pm

zedder69
 
Posts: 5
Joined: Tue Apr 18, 2006 2:00 pm
Location: Brazil

Postby Batalf » Tue Apr 18, 2006 3:09 pm

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby zedder69 » Tue Apr 18, 2006 3:22 pm

zedder69
 
Posts: 5
Joined: Tue Apr 18, 2006 2:00 pm
Location: Brazil

Postby Batalf » Tue Apr 18, 2006 6:57 pm

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby zedder69 » Tue Apr 18, 2006 7:44 pm

zedder69
 
Posts: 5
Joined: Tue Apr 18, 2006 2:00 pm
Location: Brazil

Postby Batalf » Wed Apr 19, 2006 4:05 pm

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby zedder69 » Fri Apr 21, 2006 7:31 pm

zedder69
 
Posts: 5
Joined: Tue Apr 18, 2006 2:00 pm
Location: Brazil

Postby Schmutzig » Sat Apr 22, 2006 2:43 am

Schmutzig
 
Posts: 1
Joined: Sat Apr 22, 2006 2:42 am
Location: USA

Arrow Keys / Enter Keys

Postby plawrence » Fri May 12, 2006 3:04 am

Hello -- this script is great -- my first venture into AJAX. I'm having two issues with the script right now.

1. When I get a list of results, I can use the up/down arrow to move between the options, but it skips to every-other option. For example, if it returns a list with 1,2,3,4,5,6 -- using the down arrow selects 1,3,5. This happens in Safari on Mac. Firefox seems to be ok.

2. When I use the arrows to select an option and then hit the enter key, it selects the option, then submits the form at the same time. Is there a way to prevent this?

Any help is appreciated.
plawrence
 
Posts: 2
Joined: Fri May 12, 2006 2:41 am

Postby noode » Fri May 12, 2006 9:52 pm

noode
 
Posts: 1
Joined: Fri May 12, 2006 9:47 pm

Next

Return to General questions regarding AJAX scripts

Who is online

Users browsing this forum: No registered users and 7 guests