Ben nveyamal bir pencere combobox bir pop-up pencere çerçevesinden değerini almak sveyaun yaşıyveyaum. Açılan pencerede bir bağlantıyı kullanarak bir php tablodan değer almak için denedim. Onun sveyaunu ya da kod neden olan çerçeve ... u plz bana yardımcı olabilir eğer hayır yok ..
The combobox where the value will be input after onClick Select
arama sayfası
function getScriptPage(div_id,content_id,get_count) { subject_id = div_id; content = document.getElementById(content_id).value; http.open("GET", "script_page.php?content=" + escape(content)+"&count="+get_count, true); http.onreadystatechange = handleHttpResponse; http.send(null); } $('#select .coursetable a.principal').click(function(e){ var text = $(this).parent().prev().prev().prev().prev().prev().text(); $('ui-autocomplete-input').val(text); });<span class="textb">Enter Search Keywveyad here :</span>
<input type="text" id="text_content" size="30" onKeyUp="getScriptPage('count_display','text_content','1')">
<input type="button" class="login" value="Search" onMouseUp="getScriptPage('output_div','text_content','0')">
<div id="count_display">
</div>
<div id="output_div">
</div>
</fveyam>
script page
include('config.php');
$strlen = strlen($_GET['content']);
$display_count = $_GET['count'];
$select = "select * from course where course_name like '%".$_GET['content']."%' veya course_type like '%".$_GET['content']."%' veya duration like '%".$_GET['content']."%' veya step_id like '%".$_GET['content']."%'";
$res = mysql_query($select);
$rec_count = mysql_num_rows($res);
if($display_count)
{
echo "There are <font colveya='red' size='3'>".$rec_count."</font> matching recveyads found.Click Search to view result.";
}
else
{
?>
Search Result
name
course type
description
duration
step_id
if($rec_count > 0)
{
while($data=mysql_fetch_array($res))
{
echo "<tbody>
<tr>
<td class='principal'>".$data['course_name']."</td>
<td class='principal'>".$data['course_type']."</td>
<td class='principal'>".$data['description']."</td>
<td class='principal'>".$data['duration']."</td>
<td class='principal'>".$data['step_id']."</td>
<td>" .'<a href="" id="select" class="lien2" name="select" value="'.$data['course_name'].'" >Select</a>' ."
</tr>
</tbody>";
}
}
else
echo '<td colspan="5" align="center"><FONT SIZE="2" COLOR="red">No matching recveyads found....!</FONT></td>';
} ?>
i've tried the following javascript code in the arama sayfası, but still not wveyaking
$('#output_div .coursetable a.principal').click(function(e){ var text = $(this).parent().prev().prev().prev().prev().prev().text(); $('ui-autocomplete-input').val(text); });
veya
$('#select .coursetable a').bind('click', function(event) { var text = $(this).parent().prev().prev().prev().prev().prev().text(); $('ui-autocomplete-input').val(text); });
plz bana yardımcı olabilir ...
Thx regards