| Autor | Zpráva | ||
|---|---|---|---|
| luma64 Profil |
#1 · Zasláno: 8. 5. 2013, 00:19:23
Zdravim, mam tabulku s viacerymi zaznamami a jeden zo stlpcov je listbox. Listbox si naplnam z tabulky. Chcem urobit po vybere z listboxu zmenu v stlpci v tabulke. Neviem ale zabezpecit id riadka, ktory treba update-ovat. Mozte pls pomoct?
$(document).ready(function()
{
$(".instrumentar").change(function()
{
var dataString = 'id='+ $(this).val();
$.ajax
({
type: "POST",
url: "update_instrumentar.php",
data: dataString,
cache: false,
success: function(html)
{
$(".state").html(html); <select name="instrumentar" class="instrumentar">
<option selected="selected">--Inštrumentár--</option>
<?php
$sql=mysql_query("select * from instrumentar order by id ASC");
while($row=mysql_fetch_array($sql))
{
echo '<option value="'.$row['id'].'">'.$row['instrumentar'].'</option>';
} ?>
</select> |
||
| Taps Profil |
#2 · Zasláno: 8. 5. 2013, 07:59:18
|
||
|
Časová prodleva: 13 let
|
|||
0