[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
www.dhtmlgoodies.com • View topic - Ajax dynamic list Still Trouble On my php page
Advertisement

Ajax dynamic list Still Trouble On my php page

Moderators: Calcifer, slothy

Ajax dynamic list Still Trouble On my php page

Postby samsee » Fri Jun 30, 2006 12:34 pm

Ajax dynamic list stil trouble for me.... the question is : how to get value on input hidden when i choose the country.

i still don't understand how to put ID result from database into input hidden.

<input type="text" id="country_hidden" name="country_hidden" value="">

when i run scripts and i view source the value still empty.

i will use this scripts for my php page, and that ID i will store to database

does everyone any idea.

regards
samsee
 
Posts: 2
Joined: Fri Jun 30, 2006 11:18 am

Postby Batalf » Fri Jun 30, 2006 12:51 pm

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

Postby samsee » Mon Jul 03, 2006 3:35 am

thank's for the answer Batalf. here the another problem

1. when i try put second scripts inside aja-dynamic-list.html

<form action="view.php" method="post">

<!-- original scripts (first scripts)-->
<tr>
<td><label for="country">Country: </label></td>
<td><input type="text" id="country" name="country" value="" onkeyup="ajax_showOptions(this,'getCountriesByLetters',event)">
<input type="hidden" id="country_hidden" name="country_ID"><!-- THE ID OF the country will be inserted into this hidden input --></td>
</tr>


<!-- add by me for test scripts (second scripts) -->
<tr>
<td><label for="country3">Country 3: </label></td>
<td><input type="text" id="country3" name="country2" value="" onkeyup="ajax_showOptions(this,'getCountriesByLetters',event)">
<input type="hidden" id="country_hidden3" name="country_ID3"><!-- THE ID OF the country will be inserted into this hidden input --></td>
</tr>

<input type="submit" value="submit">


when i post the this scripts into php, i get the value from original scripts. but i can't get the second value from second scripts.


2. I try with this scripts


for($i=1;$i<=4;$i++){

?>


<!-- original scripts (first scripts)-->
<tr>
<td><label for="country">Country: </label></td>
<td><input type="text" id="country" name="country" value="" onkeyup="ajax_showOptions(this,'getCountriesByLetters',event)">
<input type="hidden" id="country_hidden" name="country_ID[]"><!-- THE ID OF the country will be inserted into this hidden input --></td>
</tr>

<?
}

when i choose Afghanistan in first input, Second input i choose Albania, Third input i choose Algeria. If i submit into
php file i can't get ID country for Albania and ALgeria


Any help is appreciated.
samsee
 
Posts: 2
Joined: Fri Jun 30, 2006 11:18 am


Return to General questions regarding AJAX scripts

Who is online

Users browsing this forum: No registered users and 7 guests