Ver Mensaje Individual
  #5 (permalink)  
Antiguo 29/04/2010, 13:40
FRACTO
 
Fecha de Ingreso: noviembre-2007
Mensajes: 45
Antigüedad: 16 años, 5 meses
Puntos: 1
Respuesta: checkbox, php y enlaces

Hola santris, en mi caso no me baso en un formulario. Dejo aqui el código para que sea mas entendible:

Código:
<div id="sub_menu">
    <h4>Enlaces rapidos:</h4>
    <ul>
    <li><a href="#" name='published' title="Publicar"><img src="styles/images/publish.icon.png" /></a></li>
    <li> | </li>
    <li><a href="#" name='published' title="No Publicar"><img src="styles/images/unpublish.icon.png" /></a></li>
    <li> | </li>
    <li><a href="#" title="Eliminar"><img src="styles/images/trash.icon.png" /></a></li>
    <li> | </li>
    <li><a href="#" title="Editar"><img src="styles/images/edit.icon.png" /></a></li>
    <li> | </li>
    <li><a href="index.admin.php?page=add_content" title="Crear"><img src="styles/images/create.icon.png" /></a></li>
    </ul>
</div>

..........

<div id="manage_menu">
    <div id="total-lines"><h5>Número de entradas totales: <?php echo $num_entries; ?></h5></div>
        <table class="border">
        <thead>
        <tr>
            <th scope="col" width="15">Id</td>
            <th scope="col" width="25"><input type="checkbox" name="select_all" class="chkdAll" value=""></th>
            <th scope="col">Titulo</th>
            <th scope="col">Publicado</th>
            <th scope="col">Sección</th>
            <th scope="col">Categoría</th>
            <th scope="col" width="40">Autor</th>
            <th scope="col" width="60">Fecha</th>
        </tr>
        </thead>
            <tbody>
                <?php
                    while($row = mysql_fetch_assoc($entries)) {    
                        
                        echo "
                        <tr>
                            <td>".$row['id']."</td> 
                            <td><input type='checkbox' class='chkId' name='items[]' value='".$row['id']."'></th>
                            <td class='title'><a href='index.admin.php?page=list_content&id=".$row['id']."' class='";
                            
                            if($row['reviewed'] == 1)
                                echo "review";
                            
                            echo "'>".$row['title']."</a></td>
                            <td>";
                            
                            if($row['published'] == 1) {
                                echo "<img src='styles/images/publish.icon.png' width='25' height='25' />";
                            }
                            else {
                                echo "<img src='styles/images/unpublish.icon.png' width='25' height='25' />";
                            } 
                            echo "</td>
                            <td>".$row['section']."</td>
                            <td>".$row['category']."</td>
                            <td>".$row['author']."</td>
                            <td>".$row['fechasp']."</td>
                        </tr>
                        ";
                    }
                ?>
            </tbody>
        </table>
</div>
Exactamente lo que quiero es que al pulsar sobre cada uno de los enlaces superiores (dentro del div sub_menu) me ejecute la funcion específica para los elementos que tengo seleccionados del checkbox.

edito: Efectivamente, he estado intentando ver como lo hace hotmail y si, es javascript. Así que si algun admin quiere trasladar este post al foro correcto seguiré preguntando por allí.

Gracias!!

Última edición por FRACTO; 29/04/2010 a las 14:00