no recargar pagina index.
Publicado por sebastian (1 intervención) el 25/05/2019 23:16:44
Hola buenas resulta que quiero mostrar noticias a través de un modal y resulta, sin embargo, no quiero que recargue la pagina index, en cada momento que abro el modal, este es un extracto del codigo donde estoy fallando. se agradece
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<!-- INICIO MODULO NOTICIAS -->
<?php
require './php/Funciones.php';
$obj = new Funciones();
//obtener registros
$publicaciones = $obj->getPublicaciones();
//echo '<pre>' ,print_r($publicaciones), '</pre>';
//exit();
?>
<link rel="stylesheet" href="css/bootstrap/css/jquery.dataTables.css">
<div class="container col-12">
<br>
<h2 style="font-family: fantasy; margin-left: 120px">Informaciones Generales</h2>
</div>
<div class="container col-10">
<table class="display myTable col-8">
<thead>
<tr>
<th>Fecha</th>
<th>Información</th>
<th> </th>
</tr>
</thead>
<tbody>
<tr>
<?php foreach($publicaciones as $publicacion): ?>
<th>
<p class="lead text-muted"><?php echo $publicacion['fecha_conf'];?></p>
</th>
<th>
<a href="#"><h4><?php echo $publicacion['titulo']; ?></h4></a>
<!-- <a href="#"><span class="badge badge-danger text-uppercase">html</span></a>
<a href="#"><span class="badge badge-primary text-uppercase">css</span></a> -->
</th>
<th>
<a href="?blog_id=<?php echo $publicacion['blog_id']; ?>" type="hidden">
<button data-title="Edit" data-toggle="modal" data-target="#prueba" class="btn btn-primary" >Leer más..</button>
</a>
</th>
</tr><?php endforeach; ?>
</tbody>
</table>
</div>
<?php
//require_once 'index_1.php';
//$obj = new Funciones();
//obtener registros
$publicacion = $obj->getPublicacion($_GET['blog_id']);
//echo '<pre>' ,print_r($publicaciones), '</pre>';
//exit();
?>
<style>
#mdialTamanio{
width: 100% !important;
}
</style>
<div class="modal fade modalActualizar" id="prueba" tabindex="-1" role="dialog" aria-labelledby="edit" aria-hidden="true">
<div class="modal-dialog modal-lg" id="mdialTamanio" style="max-width: 950px">
<div class="modal-content">
<!-- <div class="modal-header">
</div> -->
<div class="modal-body">
<h4 class="modal-title"><?php echo $publicacion['titulo'];?></h4>
<p class="text-warning"><small><p>Autor: <?php echo $publicacion['usuario'];?></p>
<p> <?php echo $publicacion['contenido'];?></p>
<object type="application/pdf" data="admin/<?php echo $publicacion['imagen'];?>" width="920px" height="380px"></object>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
</div>
</div>
</div>
</div>
<!-- fin de modulo-->
Valora esta pregunta
1